我正在使用facebook连接登录我的网站。
在我的html页面中,我编写了以下代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test JOpenID </title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId:'180065668680582',
cookie:true,
status: true,
xfbml:true
});
</script>
<fb:login-button perms="email,user_checkins">
Login with Facebook
</fb:login-button>
</body>
</html>因此,当我点击Login with Facebook按钮时,弹出一个窗口,要求填写用户名和密码。到现在为止,一切都运行正常。当我单击允许按钮进入目标网站时,问题仍然存在。弹出窗口也会出现和消失。窗口的收银机是XD代理,在url上是::
http://static.ak.fbcdn.net/connect/xd_proxy.php#cb=f183a80ac008141&origin=http%3A%2F%2F174.129.214.219%2Fff715e2f856e19&relation=opener&transport=flash&frame=f1d4f8afdf94ebe&result=%7B%22perms%22%3A%22email%2Cuser_checkins%22%2C%22selected_profiles%22%3A100001492618815%2C%22session%22%3A%22%7B%5C%22session_key%5C%22%3A%5C%222.pRXlnxq8Ig6QwZyJsG732w__.3600.1294326000-100001492618815%5C%22%2C%5C%22uid%5C%22%3A%5C%22100001492618815%5C%22%2C%5C%22expires%5C%22%3A1294326000%2C%5C%22secret%5C%22%3A%5C%225pe7qxMU_7DitJucmcyftA__%5C%22%2C%5C%22access_token%5C%22%3A%5C%22180065668680582%7C2.pRXlnxq8Ig6QwZyJsG732w__.3600.1294326000-100001492618815%7C_QjDI7eTUD32QVvapbsqxn-r4DE%5C%22%2C%5C%22sig%5C%22%3A%5C%22aa66a1d8b234ebe863e386bb8a6520e7%5C%22%7D%22%7D
根据我的要求,我需要后,允许facebook是应该允许我进入的目的网站,我已经注册。但它只出现在一扇窗里,一秒钟就消失了。
问题是什么,如何解决,请详细告诉我…
谢谢
发布于 2011-01-07 22:35:09
不要使用
FB.init({ apiKey: 'API_KEY' });并使用
FB.init({ appId: 'APP_ID', status: true, cookie: true, xfbml: true });发布于 2011-02-02 23:22:11
要在Opera中修复它,只需在FB.init()之后添加以下内容:
if($.browser.opera ) // it uses jQuery library here!
{
FB.XD._transport="postmessage";
FB.XD.PostMessage.init();
}发布于 2012-02-28 18:43:45
我在IE9上也遇到过同样的问题,似乎是因为升级到了Flash player10,自从找到一个open bug at Facebook来解决这个问题后,我已经对解决这个问题失去了希望。但是Henson发布了an answer,帮我解决了这个问题。在我的站点管理员的JavaScript中,我删除了行
FB.UIServer.setLoadedNode = function (a, b) {
//HACK: http://bugs.developers.facebook.net/show_bug.cgi?id=20168
FB.UIServer._loadedNodes[a.id] = b;
};现在它起作用了。(注:我没有检查过IE8发布这些行的目的是否为了克服回报。)
https://stackoverflow.com/questions/4615453
复制相似问题