简体   繁体   中英

Facebook app- posting on a friend wall

I am sorry if this question is a bit of repetition of early questions but I didn't find any relevant answers.

I am building a FB app and I am trying to publish to a friend wall using this code:

$attachment = array(
'access_token' => $facebook->getAccessToken(),
'message' => 'Did a Test Post :',
'name' => "This is the title of my post",
'link' => "http://blogs.canalplan.org.uk/steve/2010/04/28/hitting-a-moving-target/",
'description' => "this is the body of the post with lots of wiffly woffly text in it, lets see if this all works ok!",
'picture'=>"http://blogs.canalplan.org.uk/steve/files/2009/12/13742_1291940983817_1389037839_836473_2130235_n.jpg",
);
100001893238650- this is a friend that give permission to publish on hes wall               
$facebook->api('/100001893238650/feed', 'POST', $attachment);  

Now, when I am using the 'me' instead of this id it works fine but whenever the id is not 'me' I get the Uncaught OAuthException: (#210) User not visible error.

I get same error using curl.

I am asking for the publish_stream and to be safe the offline_access(I don't think the offline_access is connected, but just to be sure) permissions.

What am I doing wrong? which permission I need more?

For the benefit of anyone that stumbles across this question in the future, please note that Facebook disabled the ability to post to a friends' wall via the Graph API as of February 2013.

See their Platform Updates from the time this change went live: http://developers.facebook.com/blog/post/2013/02/06/platform-updates--operation-developer-love/

Have you checked out this post: How to publish Facebook feed as someone else other than the logged in user?

(Slightly different problem but same error!)

It can be because the owner of the wall has used a privacy setting that prevent other users to post to his/her wall.
It can also be because of a Facebook bug. See http://bugs.developers.facebook.net/show_bug.cgi?id=11471

Go to that friends wall and make sure if you can post on his wall. This happens when facebook user has not allowed you to post on his wall. you can use try catch to handle error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM