Facebook Graph API Comments

I am trying to use facebook graph api on my blog so that users leave comments and view comments on the article being viewed, I looked at the api graphic page there, and I always get the error "unauthorized mail request"

I have a publish_stream and status_update request, when users accept my application through fbconnect, I use the same 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
   )
);
+3
source share
2 answers

You go about it wrong ...

You can use the publishing method only for publishing on the user's wall, on the page wall. You cannot pass id this way:

http://developers.facebook.com/docs/reference/api/post/

, , facebook:

http://developers.facebook.com/docs/reference/plugins/comments

-Roozbeh

+1
facebook -> api('/'.$post_id.'/comments', 
   'post', 
   array(
      'message' => 'users comment',
   )
);

, facebook api, ,

0

Source: https://habr.com/ru/post/1784865/


All Articles