Facebook graph api 使用AJAX拒绝fb_xdm_frame_https权限

Facebook graph api 使用AJAX拒绝fb_xdm_frame_https权限,facebook-graph-api,jquery,facebook-comments,Facebook Graph Api,Jquery,Facebook Comments,我正在加载api,如下所示: <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : 'YOUR_APP_ID', // App ID channelURL : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File

我正在加载api,如下所示:

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

    (function(d){ 
    var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} 
    js = d.createElement('script'); js.id = id; js.async = true; 
    js.src = "//connect.facebook.net/el_GR/all.js"; 
    d.getElementsByTagName('head')[0].appendChild(js); 
    }(document)); 
</script>
而且它看起来好像还在加载(gif一直在播放)


有什么想法吗?

我认为您没有正确加载javascript sdk。请尝试此代码

window.fbAsyncInit = function() {
     FB.init({
          appId      : 'appid', // App ID
          channelUrl : 'http://www.url.com', // Channel File
          status     : true, // check login status
          cookie     : true, // enable cookies to allow the server to access the session
          xfbml      : true  // parse XFBML
     });
};

 (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 = "//connect.facebook.net/en_US/all.js";
      ref.parentNode.insertBefore(js, ref);
 }(document));

我认为您没有正确加载javascript sdk。请尝试此代码

window.fbAsyncInit = function() {
     FB.init({
          appId      : 'appid', // App ID
          channelUrl : 'http://www.url.com', // Channel File
          status     : true, // check login status
          cookie     : true, // enable cookies to allow the server to access the session
          xfbml      : true  // parse XFBML
     });
};

 (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 = "//connect.facebook.net/en_US/all.js";
      ref.parentNode.insertBefore(js, ref);
 }(document));

你有一个可以看到这种情况发生的url吗?肖恩,没有,我放弃了这个想法,实现了我的自定义评论。仅供参考,当您单击打开对话框的其中一种食物时发生了这种情况。您有可以看到这种情况的url吗?Sean,没有,我放弃了这个想法,实现了我的自定义注释。仅供参考,当您单击打开对话框的其中一种食物时,会发生这种情况。
window.fbAsyncInit = function() {
     FB.init({
          appId      : 'appid', // App ID
          channelUrl : 'http://www.url.com', // Channel File
          status     : true, // check login status
          cookie     : true, // enable cookies to allow the server to access the session
          xfbml      : true  // parse XFBML
     });
};

 (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 = "//connect.facebook.net/en_US/all.js";
      ref.parentNode.insertBefore(js, ref);
 }(document));