I have a like button on my page and I'm listening for events edge.create and edge.remove. I've implemented the following code snippet obtained from the Facebook developers page:
<div id="fb-root"></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
window.fbAsyncInit = function() {
FB.Event.subscribe("edge.create", function(targetUrl) {
console.log("liked");
});
FB.Event.subscribe("edge.remove", function(targetUrl) {
console.log("removed");
});
}
</script>
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="standard" data-action="like" data-show-faces="true" data-share="false"></div>
However, I am struggling to capture events when a user clicks on the "close" or "add a comment" buttons in the popup. I tried using "comment.create" and "message.send" but without success.
Is there any way to detect these events?