Facebook Graph API 评论
我正在尝试在我的博客上使用 facebooks graph api 供用户留下评论并查看那里查看的文章的评论,我查看了那里的 graph api 页面,我总是收到错误“未经授权的发布请求”
我有请求publish_stream和 status_update 当用户通过 fbconnect 接受我的应用程序时,我使用如下类似的代码来发布评论:
facebook -> api('/http://www.mysite.com/blog/article-title-here/likes',
'post',
array(
'id' => 'http://www.mysite.com/blog/article-title-here',
'message' => 'users comment',
'created_time' => PHP_DATE_FUNCTION
)
);
I'm trying to use facebooks graph api on my blog for users to leave comments and view comments for a article there viewing, ive looked at there graph api page and I'm always getting an error 'unauthorised post request'
I have request publish_stream and status_update when users accept my app via fbconnect, I'm using similar code as below to post a comment:
facebook -> api('/http://www.mysite.com/blog/article-title-here/likes',
'post',
array(
'id' => 'http://www.mysite.com/blog/article-title-here',
'message' => 'users comment',
'created_time' => PHP_DATE_FUNCTION
)
);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的处理方式是错误的...
您只能使用发布方法在用户、页面、组的墙上发布。您不能像这样传递 id:
http://developers.facebook.com /docs/reference/api/post/
作为另一种方法,您可能想查看 facebook 提供的评论框插件:
http://developers.facebook.com/docs/reference/plugins/comments
-Roozbeh
You're going about this the wrong way...
You can only use the publish method to publish on a user's, page's, group's wall. You can't pass an id around like that:
http://developers.facebook.com/docs/reference/api/post/
As an alternative way, you might want to look into the comment box plugin that facebook offers:
http://developers.facebook.com/docs/reference/plugins/comments
-Roozbeh
我认为如果您尝试在帖子或照片上发表评论,那么您需要使用最新的 facebook graph api,然后使用这个
i think you you need to use latest facebook graph api if you are try to post comment on posts or photo then use this