【问题标题】:We are getting a permission denied error in IE8. facebook-graph-api我们在 IE8 中收到权限被拒绝错误。 facebook-graph-api
【发布时间】:2020-07-08 02:54:30
【问题描述】:

我们在 IE8 中遇到权限被拒绝错误。它发生在 FB.init 之后。我们已经尝试了 channelUrl 修复。我们在正文之后放置了第一个标签。我们已经在脚本和 channel.html 中尝试了 document.domain。我们已经尝试了 FB.UIServer.setActiveNode 解决方法。 它在 IE9、FF、Chrome 和 Safari 中运行良好。

<div id="fb-root"></div>
  <script src="//connect.facebook.net/en_US/all.js"></script>
  <script type="text/javascript">
          var myUserId;
          document.domain = 'XXXX.XXXX.com';

          window.fbAsyncInit = function() {
              FB.init({ appId: 'XXXXXXXXX',
                  status: true,`enter code here`
                  cookie: true,
                  xfbml: true,
                  channelUrl: 'http://XXX.XXXX.com/channel.html'
              });
              FB.UIServer.setActiveNode = function(a, b) { FB.UIServer._active[a.id] = b; } // IE hack to correct FB bug

我在 facebook-iframe 中的 IE8 中为 facebook-fanpage 上的标签应用程序收到权限被拒绝错误。任何想法如何解决这一问题?

【问题讨论】:

    标签: facebook proxy fbml


    【解决方案1】:

    这对我有用:

    FB.init({
        appId:        'xxxxx',
        appSecret:    'xxxxxxxxx',
        status:        true
        cookie:        true
    });
    
    // this code solves the issue
      FB.UIServer.setLoadedNode = function (a, b) { 
      FB.UIServer._loadedNodes[a.id] = b; 
    };
    

    在这里看到http://ikorolchuk.blogspot.com/2011/09/facebook-javascript-sdk-security-error.html?showComment=1323866805727#c7681567069563597438

    【讨论】:

      【解决方案2】:

      我建议附加调试器并准确发布错误发生的位置。如果它与 Facebook 代理相关,则可能是 Facebook 的临时问题。

      几个建议(上面没有提到):

      1/ 尝试将 FBML 添加到您的 html 标签中:

      <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en">
      

      2/ 如果您正在访问可能被视为 Intranet 站点(通常相同的子网)的测试服务器,请尝试禁用兼容模式选项。

      【讨论】:

        【解决方案3】:

        这可能是因为您当前的 iframe 是 https 时重定向到 HTTP 页面。

        iframe 的协议可以是 https,可能是因为内部重定向,即使 Facebook 页面是 http。

        【讨论】:

          猜你喜欢
          • 2016-01-13
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-10-11
          • 1970-01-01
          • 2018-07-19
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多