douti0687 2018-09-11 06:21
浏览 19

如何删除使用Social Plugin创建的Facebook评论

I have created a script using Social Plugin with my URL for comments.

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.1&appId=346512332380972&autoLogAppEvents=1';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-comments" data-href="http://localhost/graph_pi/facebook.php" data-numposts="5"></div>

I am able to view comments. I want to delete these comments. Is there any option to delete these comments?

I have also used graph API. I can view the comments using graph API by comment_id. But I am not able to delete the comment. I am getting below error.

Fatal error: Uncaught Facebook\Exceptions\FacebookAuthenticationException: (#3) Publishing comments through the API is only available for page access tokens in D:\xampp\htdocs\graph_pi\vendor\facebook\graph-sdk\src\Facebook\Exceptions\FacebookResponseException.php:133 Stack trace: #0 D:\xampp\htdocs\graph_pi\vendor\facebook\graph-sdk\src\Facebook\FacebookResponse.php(210): Facebook\Exceptions\FacebookResponseException::create(Object(Facebook\FacebookResponse)) #1 D:\xampp\htdocs\graph_pi\vendor\facebook\graph-sdk\src\Facebook\FacebookResponse.php(255): Facebook\FacebookResponse->makeException() #2 D:\xampp\htdocs\graph_pi\vendor\facebook\graph-sdk\src\Facebook\FacebookResponse.php(82): Facebook\FacebookResponse->decodeBody() #3 D:\xampp\htdocs\graph_pi\vendor\facebook\graph-sdk\src\Facebook\FacebookClient.php(224): Facebook\FacebookResponse->__construct(Object(Facebook\FacebookRequest), '{"error":{"mess...', 400, Array) #4 D:\xampp\htdocs\graph_pi\vendor\facebook\graph-sdk\src\Facebook\Facebook.php(469): Facebook\Facebook in D:\xampp\htdocs\graph_pi\vendor\facebook\graph-sdk\src\Facebook\Exceptions\FacebookResponseException.php on line 133

Can you please help to fix this issue.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法
    • ¥15 可否在不同线程中调用封装数据库操作的类
    • ¥15 微带串馈天线阵列每个阵元宽度计算
    • ¥15 keil的map文件中Image component sizes各项意思
    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据