1

我正在使用 Graph API 制作电报自动评论机器人,但输出显示 media_id 中存在错误。

$url = "https://graph.facebook.com/1234567890/comments?message=Hi+how+u";

$curl = curl_init($url);

curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array('access_token' => 'access_token')));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($curl);
curl_close($curl);
file_put_contents("res.json", $response);

我希望输出如下:

{
  "id": "1234567890"
}

但它说:

{"error":{"message":"(#33) 此对象不存在或不支持此操作","type":"OAuthException","code":33,"fbtrace_id":"GQZLb8cu19p"} }

4

0 回答 0