我正在使用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上是::
根据我的要求,我需要后,允许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
复制相似问题