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.