Вопрос

I've got like button on page and I'm catching events edge.create and edge.remove. I'm using this code from 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>

But I can't find a way to catch events when user clicks "close" or "add a comment" button in popup. I tried with "comment.create" and "message.send" and it didn't work.

Is there any way to catch these events?

Это было полезно?

Решение

See Marc Witteveen's answer and my answer at Catching the close or post to Facebook event of the Facebook comment box for polling for the height of the comment dialog. This is working for me.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top