Chr*_*idt 1 facebook facebook-graph-api
我正在开发一个代表其用户进行离线发布的fb-app,我无法使隐私参数正常工作.
事实:
现在我想发布并限制显式用户列表的可见性.根据这个文档https://developers.facebook.com/docs/reference/api/privacy-parameter/我可以结合'value'和'allow',所以我使用了这个参数:
{'value': 'CUSTOM', 'allow': '{ REAL_ID }'}
Run Code Online (Sandbox Code Playgroud)
但遗憾的是这是回应:
{"error":{"message":"(#100) 'friends' value was not recognized","type":"OAuthException","code":100}}
Run Code Online (Sandbox Code Playgroud)
虽然不推荐使用friends-parameter,但我也尝试了这些组合,但没有运气:
{'value': 'CUSTOM', 'allow': 'ALL_FRIENDS'}
-> {"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1}}
{'value': 'CUSTOM', 'allow': 'ALL_FRIENDS', 'deny': '{ REAL_ID }'}
-> {"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1}}
{'value': 'CUSTOM', 'friends': 'ALL_FRIENDS'}
-> {"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1}}
{'value': 'CUSTOM', 'friends': 'SOME_FRIENDS', 'allow': '{ REAL_ID }'}
-> {"error":{"message":"(#100) 'friends' value was not recognized","type":"OAuthException","code":100}}
Run Code Online (Sandbox Code Playgroud)
如果有人可以提供帮助会很棒,因为我完全失去了这个:(
提前致谢!
好的,在联系facebook支持后,我会回答我自己的问题.也许它可以帮助别人......
1)fb在其文档中使用的示例令人困惑:
"privacy={'value': 'CUSTOM', 'allow': '{friend-list-id}'}"
Run Code Online (Sandbox Code Playgroud)
外部括号是正确的,内部的括号应该用您的friends-id或friends-id替换为逗号分隔列表.所以一个有效的参数是:
"privacy={'value': 'CUSTOM', 'allow': '1234567,3456789'}"
Run Code Online (Sandbox Code Playgroud)
2)使用app-access-token发布时,不支持隐私的CUSTOM值.只有user-access-token支持此功能.
| 归档时间: |
|
| 查看次数: |
868 次 |
| 最近记录: |