How to close the Facebook pop-up login window after the user Connects?

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2009-10-22T22:22:08Z Indexed on 2010/03/26 2:43 UTC
Read the original article Hit count: 314

Below is my code. For some reason, after the user logs into the little pop-up window, the little window will redirect back to '/" with a lot of session JSON junk at the end of the URL.

How do I make it so that the little window closes, and my parent window refreshes?

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>

<fb:login-button v="2" onlogin='window.location("/test");' size="medium">Connect</fb:login-button>
<script type="text/javascript">FB.init("XXXXX",'/xd_receiver.htm');</script>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about facebook