Facebook Graph API Comments
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/artic开发者_如何学Cle-title-here',
'message' => 'users comment',
'created_time' => PHP_DATE_FUNCTION
)
);
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 -> api('/'.$post_id.'/comments',
'post',
array(
'message' => 'users comment',
)
);
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
精彩评论