Facebook API & Spring Social — how to post a friends wall

倾然丶 夕夏残阳落幕 提交于 2019-12-02 02:06:10

问题


I have a facebook app set up to require the extended permission 'publish_stream' (Settings >> Permissions >> Extended Permissions: 'publish_stream'.

I also have the hidden input field named "scope" with a value including "publish_stream".

When I publish an update via

<Facebook>.feedOperations().post(<friendId>, "<message>")

I get the following exception:

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)

回答1:


The possibilty to post to friend’s walls via API will be removed in February 2013 – https://developers.facebook.com/roadmap/#february-2013:

“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.



来源:https://stackoverflow.com/questions/13776441/facebook-api-spring-social-how-to-post-a-friends-wall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!