可能重复:
How to delete a Facebook comment post using the Facebook GRAPH API?
我正在使用FQL查询来获取帖子的所有评论。 然后使用Javascript SDK发表评论:
FB.api("/"+postId+"/comments", 'post', { message: comment }, function(response){ if (!response || response.error) { alert('Error occured'); } else { alert('Post was deleted'); } });
我尝试使用Javascript SDK和FQL删除评论但失败了。
这个问题不重复,因为我问如何使用Javascript SDK而不是Facebook GRAPH API删除评论。
答案 0 :(得分:1)
我使用Javascript SDK& amp;以前的问题SO:
从FQL表注释中的字段ID获取 comment_id 变量。
FB.api('/'+comment_id, 'delete', function(response) { if (!response || response.error) { alert('Error occured'); } else { alert('Post was deleted'); } });