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)
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