Facebook API和Spring Social-如何发布朋友墙 [英] Facebook API & Spring Social -- how to post a friends wall
问题描述
我有一个Facebook应用程序设置为要求扩展权限'publish_stream'(设置>>权限>>扩展权限:'publish_stream'.
I have a facebook app set up to require the extended permission 'publish_stream' (Settings >> Permissions >> Extended Permissions: 'publish_stream'.
我还有一个名为"scope"的隐藏输入字段,其值包括"publish_stream".
I also have the hidden input field named "scope" with a value including "publish_stream".
当我通过发布更新时
<Facebook>.feedOperations().post(<friendId>, "<message>")
我收到以下异常:
org.springframework.social.OperationNotPermittedException: (#200) Feed story publishing to other users is disabled for this application
org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError(FacebookErrorHandler.java:113)
org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleError(FacebookErrorHandler.java:60)
推荐答案
The possibilty to post to friend’s walls via API will be removed in February 2013 – https://developers.facebook.com/roadmap/#february-2013:
我们将删除通过Graph API发布到用户朋友的墙上的功能.具体来说,针对[user_id]/会话用户不同的[user_id]/feed或target_id用户与会话用户不同的stream.publish调用将失败."
"We will remove the ability to post to a user's friends' walls via the Graph API. Specifically, posts against [user_id]/feed where [user_id] is different from the session user, or stream.publish calls where the target_id user is different from the session user, will fail."
如果您的应用程序已经失败,也许您已在设置中启用了相应的迁移?
If it fails for your app already, maybe you have the corresponding migration enabled in your settings?
无论如何,现在开发这种东西没有多大意义,因为它将在几周内不再起作用.
Anyway, not much point in developing such a thing now, since it won’t work any more in a few weeks.
这篇关于Facebook API和Spring Social-如何发布朋友墙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!