Possible Duplicate:
How to delete a Facebook comment post using the Facebook GRAPH API?
I’m using FQL Query to get all comments from posts.
Then using Javascript SDK to post comment:
FB.api("/"+postId+"/comments", 'post', { message: comment }, function(response){
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post was deleted');
}
});
I try using Javascript SDK and FQL for delete comment but failed.
This question isn’t duplicate because I ask how to delete comments using Javascript SDK not Facebook GRAPH API.
I figure it out using Javascript SDK & previous questions SO:
get comment_id variable from field id from FQL table comment.
FB.api('/'+comment_id, 'delete', function(response) { if (!response || response.error) { alert('Error occured'); } else { alert('Post was deleted'); } });