Search code examples
facebookcomments

how to get notification when people post a comment using facebook comment plugin


I have created a static webpage and have included facebook comment plugin.

A person commented but i did not receive any notification in facebook or in my email.

What should i do to get notifications to my email when people post using facebook comment?

do i have to do something like this

FB.subscribe('comment.create', function(response){

    //make an ajax request to a server side script
    // and in that i can send a mail to my email... isn't it?
    }
});

since that page is totally html i dont want to use any more javascripts yet if needed then i will have to use.

so is that the way to notify myself when an user posts a comment using the facebook comment plugin...


Solution

  • in the official documentation (http://developers.facebook.com/docs/reference/plugins/comments/) it says in the FAQ part:

    How do I know when someone comments on my site?

    You can subscribe to the 'comment.create' and 'comment.remove' events through FB.Event.subscribe.

    so yes, you will need to use this method to be notified on comments.