3

我正在使用下面的代码作为页面发布到我的 Facebook 页面

$post_id = $facebook->api("/$page_id/feed","post",$args);

我想对我创建的帖子发表评论。我不知道该怎么做。但是根据一些研究,我尝试了下面的代码,但没有成功。

$comment_id = $facebook->api("/$post_id/comments?message='This is m message'");

$comment_idechoprint_r不会返回任何内容。

我怎样才能完成它,即使用 PHP 的 Facebook 图形 API 在我的 Facebook 页面上发布评论?请引导我正确的方向。

4

1 回答 1

3

试试这样的,

$facebook ->api('/'.$post_id.'/comments', 
 'post', 
    array(
      'access_token' => $your_access_token_variable,
      'message' => 'Your message',
    )
);
于 2013-04-24T06:46:54.980 回答