Facebook发送按钮工作,但不消息'message.send'事件

时间:2013-08-05 12:09:58

标签: facebook facebook-php-sdk facebook-social-plugins xfbml

我已经嵌入了Facebook发送按钮。它有效,所以我可以通过它发送消息和链接。

但是,message.send事件未触发。

我再次尝试但现在有一个新页面,除了我从herehere以及FB.Event.subscribe文档中复制粘贴的代码外,其中没有任何内容。

我在控制台中没有出现任何错误。

非常感谢任何帮助。

我的代码:

<!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 个答案:

答案 0 :(得分:0)

也在这里。我在https://developers.facebook.com/x/bugs/1425315047692224/创建了一个错误报告,请订阅。

相关问题