Question

I have a problem where the subscribe event for my Like-box never fires. I've been searching a bit around, and I see people saying that there is a known issue that the event does not fire if the user is not logged in when he/she clicks the button. In my case, the event NEVER fires.

Here's my code:

<script>
window.fbAsyncInit = function() {
    FB.Event.subscribe('edge.create', function(response) {
        console.log('event did fire');
    });
};

(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 = "//connect.facebook.net/sv_SE/all.js#xfbml=1&appId=161828577334444";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<div class="fb-like-boxdgdghgh"><fb:like-box href="http://www.facebook.com/myurlgoeshere" width="292" height="200" show_faces="true" stream="false" show_border="false" header="false"></fb:like-box></div>

What is really weird is that if I change the xfbml to be the like-button instead of the like-box, the event fires.

Does anyone have any clue as to why this is happening? I've done just like the docs says and as I said, having a like-button instead of a like-box works like a charm.

Was it helpful?

Solution

You might want to refer and track this bug on Facebook Developers.

https://developers.facebook.com/bugs/508219649233845

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top