Facebook Connect Login redirecting in Chrome and Safari

Posted by Lobe on Stack Overflow See other posts from Stack Overflow or by Lobe
Published on 2010-01-01T05:12:28Z Indexed on 2012/09/17 3:38 UTC
Read the original article Hit count: 244

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

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>

And the button

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

Obviously with Appid and domain hidden. Any ideas?

EDIT: 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.

© Stack Overflow or respective owner

Related posts about login

Related posts about google-chrome