如何使用 Facebook API 覆盖默认隐私设置?
我在 Facebook 中将默认隐私设置设置为自定义(仅限您)。 然后我有以下代码来创建相册:
$privacy = Array('value'=>'ALL_FRIENDS');
$privacy = (object)$privacy;
$albumDetails = array(
'name' => 'My album name',
'privacy' => $privacy
);
$facebook->api('/me/albums', 'post', $albumDetails);
执行代码后,相册已创建,但隐私保留为自定义(仅限您),而不是所有朋友/朋友。我的代码有什么问题。是否有任何特殊代码可以覆盖默认隐私?
谢谢。
I got default privacy setting set to Custom (Only you) in my facebook.
Then I have the following code to create a photo album:
$privacy = Array('value'=>'ALL_FRIENDS');
$privacy = (object)$privacy;
$albumDetails = array(
'name' => 'My album name',
'privacy' => $privacy
);
$facebook->api('/me/albums', 'post', $albumDetails);
After executing the code, album is created but the privacy is keep to Custom (only you), not All friends/friends. What's wrong in my code. Is there any special code to override the default privacy?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不能保证!
在开发人员文档中 http://developers.facebook.com/docs/reference/api/帖子/
说
这意味着,开发人员无法对其应用程序进行隐私控制,用户是否可以从墙上控制它,如果应用程序使用隐私统计员就会失去对隐私设置的控制:p
对不起,我的英语不好:p
i can't promise it !
in the developer docs http://developers.facebook.com/docs/reference/api/post/
says
this mean, the developer can't make privacy control on their app did user can control it from wall, and if then application use privacy statmen is make lost control of privacy settings :p
sorry my bad english :p
您无法覆盖用户在其配置中声明的默认隐私,除非您将其覆盖为更具限制性的选项。
这意味着如果用户的默认配置设置为“所有朋友”,并且您指定“仅我”,则它将起作用。但不是相反,就像你想做的那样
You can't override the default privacy that the user stated in their configuration, unless you are overriding it to a more restrictive option.
Meaning that if the user's default configuration is set to "All friends", and you specify "Only me", it will work. But not the other way around, like you are trying to do