Facebook 应用程序 - 在朋友墙上发帖

发布于 2024-10-06 21:35:44 字数 984 浏览 2 评论 0原文

如果这个问题有点重复早期的问题,我很抱歉,但我没有找到任何相关的答案。

我正在构建一个 FB 应用程序,并尝试使用以下代码发布到朋友墙:

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

现在,当我使用“me”而不是这个 id 时,它工作正常,但每当 id 不是“me”时,我都会得到 Uncaught OAuthException:(#210) 用户不可见错误。

我使用curl 遇到同样的错误。

我要求publish_stream并确保offline_access的安全(我不认为offline_access已连接,但只是为了确定)权限。

我做错了什么?我还需要哪个权限?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

我的奇迹 2024-10-13 21:35:44

为了将来遇到这个问题的任何人的利益,请注意,自 2013 年 2 月起,Facebook 禁用了通过 Graph API 向朋友墙发帖的功能。

查看此更改生效后他们的平台更新:< a href="http://developers.facebook.com/blog/post/2013/02/06/platform-updates--operation-developer-love/" rel="nofollow">http://developers.facebook。 com/blog/post/2013/02/06/platform-updates--operation-developer-love/

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/

日裸衫吸 2024-10-13 21:35:44

您查看过这篇文章吗:如何以登录用户以外的其他人身份发布 Facebook feed?

(问题略有不同,但错误相同!)

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

野生奥特曼 2024-10-13 21:35:44

这可能是因为墙的所有者使用了隐私设置,阻止其他用户在他/她的墙上发帖。
这也可能是因为 Facebook 的错误。请参阅 http://bugs.developers.facebook.net/show_bug.cgi?id= 11471

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

葬花如无物 2024-10-13 21:35:44

前往该朋友的留言墙上,确保您是否可以在他的留言墙上发帖。当 Facebook 用户不允许您在他的墙上发帖时,就会发生这种情况。您可以使用 try catch 来处理错误。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文