Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Activity Privacy

I am using the FB Javascript SDK to create an activity, the activity is posting fine but the documentation for how to set the privacy of an activity doesn't really give me anything. I have followed the documentation on this page: https://developers.facebook.com/docs/opengraph/actions/

I get an error when using the following code:

var fb_privacy = '{"value":"PRIVATE"}';
fb_privacy = encodeURIComponent(fb_privacy);

Error: (#100) privacy must contains a valid privacy 'value'

I have also tried the value "SELF" which yielded the same error. It says privacy is suppose to be a JSON encoded string but I can't seem to get anything to work currently.

like image 537
dbslone Avatar asked May 02 '26 23:05

dbslone


1 Answers

try this https://developers.facebook.com/docs/reference/api/privacy-parameter/ with only this text {'value':'EVERYONE'} i have tested 5 minutes ago =)

use ' not "

like image 59
Federal09 Avatar answered May 05 '26 15:05

Federal09



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!