我有一篇文章想评论一下如何使用 API。根据文档的:
您可以写入 POST_ID/评论连接,通过发出具有publish_stream权限和以下参数的 HTTP POST 请求来将评论发布到帖子。
Parameter Description Type Required
message Comment text string yes
所以我的压力是 API 调用看起来像这样:
$postId = "1234567890";
$facebook->api($postId."/comments", 'POST');
但是在哪里指定消息参数?
我试过了:
$facebook->api($postId."/comments", 'POST', array("message"=>"hello world");
但没有骰子。
您的 postID 可能不准确。
据我所知,facebook的postID可能有几个部分
比如粉丝页面上的帖子的postId将具有以下格式:
PAGEID_POSTID
例如 : 3201235968_1234567890
祝你好运