Notify facebook application admin when comments are posted using social plugin

前端 未结 1 1214
一个人的身影
一个人的身影 2021-02-09 13:08

Is it possible to send notification to facebook application admins when comments are posted using facebook social comments plugin?

Comment plugin is set up this way:

1条回答
  •  醉梦人生
    2021-02-09 13:54

    I set up a simple PHP script to email me whenever a comment is posted. The PHP is like this:

    and this JavaScript passes the URL of the comment page to the PHP script:

    FB.Event.subscribe('comment.create', function(response){
    var dummyImage = new Image;
    dummyImage.src = 'http://example.com/facebook_notification.php?path='+response.href.replace('http://','');
    });
    

    I can easily add more addresses if I need to.

    0 讨论(0)
提交回复
热议问题