FB.init 在 IFrame 导致 IE8 无限循环,一段时间后出现 Flash 错误消息

FB.init in IFrame cause to infinite loop at IE8 and after sometime to Flash error message

本文关键字:Flash 消息 错误 一段时间 init IFrame 导致 无限循环 IE8 FB      更新时间:2023-09-26

我没有在我的应用程序中使用任何Flash。导致问题的代码是您可以在最后找到的最简单的代码。

我将我的应用程序配置为在 IFrame 中工作,就像它在 facebook 开发人员网站上提到的那样。

问题是,当我添加 init 选项时,页面不会停止对 IE8 中的服务器进行 ajax 调用(无限循环),如果我玩了一段时间并在单击按钮提交表单后上下移动我会看到这些错误:

错误 #2044:未处理 安全错误事件:。文本=错误#2047: 安全沙盒违规: LocalConnection.send: ak.fbcdn.net 无法访问 http://static.ak.fbcdn.net/rsrc.php/v1/yF/r/Y7YCBKX-HZn.swf。

错误 #2044:未处理的状态事件:。 级别=错误,代码=

同样,我没有在我的Facebook应用程序中使用任何Flash/Flex/SWF,我使用的是最简单的代码,只包含JS,没有任何更改。

<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<body>
<!-- stylesheets for the UI -->
<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId  : 'YOUR APP ID',
      status : true, // check login status
      cookie : true, // enable cookies to allow the server to access the session
      xfbml  : true  // parse XFBML
    });
  };
  (function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  }());
</script>
<form>
    <button type="submit"> WOW</button>
</form>
</body>
</html>

在 Facebook 开发者应用中检查您的应用设置:如果您错误地设置了"站点域"字段,我注意到了类似的问题。该页面只是一遍又一遍地刷新。

我不知道该放什么值来让它停止这样做,所以我只是清除了那个字段,问题就消失了。