facebook-graph-api - Facebook API 用于回复业务页面上的评论
问题描述
我已经完成了所有设置,并且一切正常。我有一个弹出窗口,用户可以在其中回复他们业务页面上的评论。这也工作正常。
我的代码如下所示:
$url = "https://graph.facebook.com/v3.2/221454575852164769/comments";
$attachment = array(
"access_token" => $page_access_token,
"message" => "Thank you so much!!",
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($attachment));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$comment = curl_exec($ch);
curl_close ($ch);
$comment = json_decode($comment, TRUE);
这工作正常。即使现在这个脚本正在运行,但问题是它返回了这个错误
Unsupported post request. Object with ID '221454575852164769' does not exist, cannot be loaded due to missing permissions, or does not support this operation
即使当我去查看 Facebook 上的评论时,Curl 收到错误,评论也已成功发布。
有什么帮助吗?
解决方案
从我标记的副本中,您会看到您可能需要将您的应用程序提交给 Facebook 以进行应用程序审查以获得权限。
https://developers.facebook.com/docs/facebook-login/permissions/v3.0
自最近引入登录审查以来,我如何测试 Facebook 应用程序?
要么是那个,要么是你输入了错误的参数/变量,因此 18 位 ID 号不正确,因为它无法引用该对象的实例。
推荐阅读
- python - 在numpy中组合两个不同维度的数组
- python - 如何解析来自多个 json 字段的数据并将它们组合在一个列表中?
- python - 如何使用库 tweepy 使用高级 twitter api 获取 1 个月的推文
- gradle - 如何在 Intellij idea 和 gradle 和 javafx 中使用曲面绘图仪或 jzy3d
- javascript - 从 Google Script 中的特定单元格自动向下拖动函数
- javascript - TypeError: {variable}.style 未定义
- java - 使用 OpenSaml 在 AuthnRequest 的签名中生成 DigestValue 和 SignatureValue
- javascript - 在颜色和大小之前更改“添加到购物车”按钮的文本
- javascript - 使用 jQuery 从表单中获取选定的值
- html - 透明图像在 HTML 页面中不透明