Facebook comment.create not firing on mobile - ios Safari and android browser

泄露秘密 提交于 2019-12-11 04:35:44

问题


This is making me crazy - I can't get the facebook comment.create event to fire on mobile devices (not that I tested work). login event is working fine (auth.authResponseChange)

<html>
<head></head>
<body>
<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
  FB.init({
    appId      : 'MYAPPID', // App ID
    channelUrl : '//WWW.MYAPPURL.COM/channel.html', // Channel File
    status     : true, // check login status
    cookie     : true, // enable cookies to allow the server to access the session
    xfbml      : true  // parse XFBML
  });

    FB.Event.subscribe('comment.create', function(response) { alert("1"); });
//  FB.Event.subscribe('auth.authResponseChange', function(response) {alert("1"); });

  };

  // Load the SDK asynchronously
  (function(d){
   var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
   if (d.getElementById(id)) {return;}
   js = d.createElement('script'); js.id = id; js.async = true;
   js.src = "http://connect.facebook.net/en_US/all.js";
   ref.parentNode.insertBefore(js, ref);
  }(document));


</script>


<fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button>


comments
<div class="fb-comments" data-notify="true" data-href="http://test/test.htm" data-width="470" data-num-posts="10"></div>
</body>
</html>

回答1:


Please note that this is still an ongoing FB bug



来源:https://stackoverflow.com/questions/17844268/facebook-comment-create-not-firing-on-mobile-ios-safari-and-android-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!