Facebook Connect登录重定向到Chrome和Safari [英] Facebook Connect Login redirecting in Chrome and Safari

查看:186
本文介绍了Facebook Connect登录重定向到Chrome和Safari的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Facebook Connect有问题,我似乎不能让我的头脑。用户单击fb-login按钮,出现弹出窗口并进行身份验证,弹出窗口关闭,并且调用登录功能。这在预期的IE和Firefox中发生。但是在Chrome和Safari中,弹出窗口将重定向到canvas网址,并且不会关闭。此外,还没有调用登录功能。我已经google了,这似乎是与xd-receiver.htm文件有关的,但它似乎很奇怪,它在IE和Firefox,而不是Chrome或Safari。感谢

I am having a problem with Facebook Connect that I can't seem to get my head around. A user clicks on the fb-login button, the pop up appears and they authenticate, the pop up closes and the on-login function is called. This happens in IE and Firefox as is expected. However in Chrome and Safari, the pop up redirects to the canvas url and doesn't close. Also the on-login function isn't called. I have googled and it seems to be something to do with the xd-receiver.htm file, however it seems weird that it is working in IE and Firefox but not Chrome or Safari. Thanks

Facebook javascript

The facebook javascript

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>
<script type="text/javascript">FB.init("xxxxxxxxxxxxxxxxxx","xd_receiver.htm");</script>

按钮

<fb:login-button v="2" size="large" onlogin='window.location = "http://www.xxxxxxxxxx.com/development/redirect.php?size=large";'>Connect</fb:login-button>

显然与Appid和域隐藏。任何想法?

Obviously with Appid and domain hidden. Any ideas?

编辑:经过更多的玩耍之后,原来我没有在Facebook设置中设置我的基本域名。为什么它在某些浏览器中工作,而不是别人打败我,但现在它的工作。感谢NSD的建议。

After a bit more playing around it turned out that I didn't have my base domain set in Facebook settings. Why it works in some browsers and not others beats me, however it works now. Thanks NSD for your suggestion.

推荐答案

旧的js sdk的部分已经折旧了 https://developers.facebook.com/roadmap/ 您可能需要迁移到OAuth2 https://developers.facebook.com/docs/oauth2-https-migration/

Parts of the old js sdk has been depreciated https://developers.facebook.com/roadmap/ You may need to migrate to OAuth2 https://developers.facebook.com/docs/oauth2-https-migration/

这篇关于Facebook Connect登录重定向到Chrome和Safari的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆