Search code examples
javascriptfacebookfacebook-graph-apifacebook-javascript-sdkfacebook-social-plugins

Track button click in Facebook comments plugin


is there any way to track button click in Facebook comments plugin? For example, in order to increase the comments counter in my own database. Is there any callbacks from this plugin? Thanks in advance for your answers!


Solution

  • You can get the count using the tag:

    fb:comments-count

    See: Comments

    UPDATED

    FB.Event.subscribe('comment.create', function(response) 
    {  
       //comment is created
    });
    
    FB.Event.subscribe('comment.remove', function(response) 
    {  
       //comment is removed
    });