FB.Event.subscribe + comments.add don't work !?
- by user366292
I'm trying to catch event when comment is sent. What am I doing wrong? I just want to update every user comment also to facebook group wall and that's why I need to catch the event.
<fb:comments numposts="10" ></fb:comments>
FB.init and event catcher:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'sensored-app-id',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
/* All the events registered */
FB.Event.subscribe('comments.add', function (response) {
// do something with response
alert("comment added");
});
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/fi_FI/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>