Facebook lets you include a comment box that visitors to your site can leave comments on. It exists as an iframe, and that allows users to comment as themselves without revealing their identity to you (the site owner).
http://developers.facebook.com/docs/reference/plugins/comments/
I would like to be able to detect when someone leaves a comment using this -- I don't want to know who they are, what their comment was, or any other details (just that they left the comment).
I can't seem to find a way to do it, but here's what I've tried or thought of doing:
Any ideas how I can detect when comments are made?
Thanks!
Facebook does expose events for such a case:
FB.Event.subscribe("comment.create", function (response) {
console.log('create', response);
});
FB.Event.subscribe("comment.remove", function (response) {
console.log('remove', response);
});
More here: FB.Event.subscribe - Facebook Developers.