How I can detect facebook comments widget submit?

89 views Asked by At

I won't detect submit button event in facebook comment widget.

https://developers.facebook.com/docs/plugins/comments I have code:

<div data-href="http://${request.getServerName()}:${request.getServerPort().toString()}/n${itemId}"
     class="fb-comments"
     data-width="100%"
     data-numposts="10"
     data-colorscheme="light"
     data-notify="true"
    >
</div>

and after I tryed call facebook event but it doesn work

<script type="text/javascript">
    $(document).ready(;
    FB.Event.subscribe('comment.create', function(response) {
        alert(JSON.stringify(response);
    });
</script>

Whot I do wrong?

1

There are 1 answers

0
Volodymyr Bilovus On
$(document).ready(function(){
        FB.Event.subscribe('comment.create', function(response) {
            console.info("##############");
            console.info(response);
        });

});

І resolve my problem.