Facebook API:通过好友列表设置帖子隐私
我研究了用于发布隐私设置更新的 Facebook API。似乎您无法通过好友列表设置隐私,但可以通过个人用户 ID 设置。有谁知道是否可以通过朋友列表设置隐私,如果可以,如何设置?
资源:
I've looked into the Facebook API for posting an update with privacy settings. It seems like you cannot set privacy by friendlist, but can set it by individual user IDs instead. Does anyone know if setting privacy by a friendlist is possible, and if so, how?
Resources:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这是可能的。调用 post graph api 时,您将发送第一个链接中链接的隐私设置。您发送“隐私”字段,其中包含值的数组或字典。唯一必需的是“value”,选项有 EVERYONE、ALL_FRIENDS、NETWORKS_FRIENDS、FRIENDS_OF_FRIENDS 或 CUSTOM。关于何时需要填写其他数组值(朋友、网络、允许和拒绝)的其余规则位于该站点上。
如果您想为帖子指定好友列表,您首先需要查询用户拥有的好友列表,这需要 read_friendlist 扩展权限。
如果您已尝试此操作但不起作用,请发布您的代码以表明您已尝试过的操作。
Yes this is possible. When calling the post graph api, you send over the privacy settings that are linked in your first link. You send over the field "privacy", which contains an array or dictionary of values. The only required one is "value", with the options of EVERYONE, ALL_FRIENDS, NETWORKS_FRIENDS, FRIENDS_OF_FRIENDS, or CUSTOM. The rest of the rules about when you need to fill in the other array values (friends, networks, allow and deny) are on that site.
If you want to specify a friend list for you the post, you would first need to query the list of friends the user has, which would require the read_friendlist extended permissions.
If you've tried this and it doesn't work, post your code to indicate what you have tried.