2011-06-15 43 views
1

我使用fbAsyncInit方法,生活在粉丝页面标签的iframe应用的FB.login生产闪存错误

<script> 
    window.fbAsyncInit = function() { 
     console.log('fb init'); 
    FB.init({ 
     appId : 12345, 
     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> 

当我调用寄存器功能检查权限(这种情况发生时,用户在页面加载后点击按钮)

register = function(){ 
console.log('starting login'); 
FB.login(function(response) { 
    if (response.session) { 
      console.log(response.session); 
     } else {     
      console.log('Did not authorize'); 
     } 
}, {perms:'email,publish_stream'}); 

};

Facebook的加载弹出窗口:http://static.ak.fbcdn.net/connect/xd_proxy.php?version=3#cb= {会话字符串变量和这里其他垃圾}

仅在IE产生闪光错误:

Error #2044: Unhandled StatusEvent:. level=error, code= 

我的网站中有

无频闪

打继续/解雇有时会冻结IE导致我结束进程,其他时间弹出消失

回答

1

我们找到了解决方案n为Flash问题。请更新FB.init

FB.init({ 
     appId : 12345, 
     status : true, // check login status 
     cookie : true, // enable cookies to allow the server to access the session 
     xfbml : true, // parse XFBML 
     channelURL : 'http://www.YOURDOMAIN.com/channel.html' 
    }); 

在您的域根文件夹中创建channel.html,把只有这个代码是:

<script src="https://connect.facebook.net/en_US/all.js"></script> 

现在在Facebook上的Flash正常工作。

0

使用Flash/FaceBook API时,Flash 10.2会出现以下错误。 SecurityError:错误#2000:没有活动的安全上下文。

Flash 10.3得到了 错误#2044:未处理的StatusEvent :.级别=错误,代码=

我从Flash应用程序调用Facebook.login()。登录成功,但是这个错误似乎破坏了这个过程。这个问题只影响IE 8,没有其他浏览器。 我试过了channelUrl,但在另一个域中,因为我没有访问flash文件的位置。我正在使用Charles来映射本地。这会工作吗?

在此之外,我迷路了。我不确定错误是由我的SWF或Facebook的代理SWF触发的。太令人沮丧了。这是几个月前的工作。

+0

您是否添加了上述答案中指定的频道网址? – chrisan 2011-06-21 09:57:11

+0

今天早上我测试了,我可以确认....这个修补程序。只要确保你的channelUrl位于相同的域.....问题...如果我们需要区域化all.js怎么办?包含在页面上的那个是否超过了这个? – leedium 2011-06-21 13:32:56

0

上面提供的解决方案对我无效。但这丝毫我在计算器上的另一个话题发现(感谢肖恩·金赛):

看到这个错误报告: http://bugs.developers.facebook.net/show_bug.cgi?id=15596 IE8,getLoginStatus当使用闪光灯XD无法完成 - 这听起来像它可能是你是什么经历。

在这种情况下,请确保您的FB-根格被设置为visibility:hidden的显示:无,因为这将导致XD闪存不渲染

(我也添加了channelURL)