Using the sample PHP code on this page works great for setting the restriction to {"location":"US"}
however it returns false when trying to set it to {"age":18}
or {"age":"18"}
. Is there a special way which this needs to be formatted in order to set an age restriction?
See the list of available restrictions here.
Thank you.
Instead of using {"age":"18"}
, use {"age_distribution":"18+"}
.
I don't know why using "age" doesn't work. The documentation says it should work, but it didn't work for me either.
However, using age_distribution
does work.