Facebook Send Button Works But Doesn't Fire 'message.send' Event

961 Views Asked by At

I've embedded the Facebook send button. It works, so I can send messages and a link through it.

However, the message.send event isn't firing.

I tried again but now with a new page, that has nothing in it, except the code which I copy-pasted from here and here and the FB.Event.subscribe documentation.

I don't get any errors in the console.

Any help will be greatly appreciated.

My code:

<!doctype html>
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
</head>

<body>
<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    // init the FB JS SDK
    FB.init({
      appId      : 'XXXXXXXXXXXXXXXXXXXXX',              // App ID from the app     dashboard
      channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel file for x-domain     comms
      cookie     : true,                                //     enable cookies to allow the server to access the session
      status     : true,                                 // Check Facebook Login status
      xfbml      : true,                                  // Look for social plugins on     the page
      oauth      : true
    });

   FB.Event.subscribe('message.send',
    function(response) {
        alert('You sent the URL: ' + response);
    }
);
  };
  (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/en_US/all/debug.js";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<fb:send href="http://www.google.com"></fb:send>

Test test
</body>
</html>
1

There are 1 best solutions below

0
Sebastien Marion On

Same here too. I created a bug report at https://developers.facebook.com/x/bugs/1425315047692224/ please subscribe.