<fb:login-button onlogin="window.location = '/custompage.html';">Connect</fb:login-button>
That's currently my code for users to log in to my site. It's in FBML.
It will pop up a box, the user then logs in. And then, it closes the new window, followed by a redirect to "custompage.html".
Now, I would like to manually render my button instead of using FBML, because it's too slow on mobile" http://wiki.developers.facebook.com/index.php/Facebook_Connect_Login_Buttons#Facebook_Connect_for_iPhone_Buttons
How do I close the popup window and redirect, using this code as explained in the doc?:
<a href="" onclick="FB.Connect.requireSession();return false;"><img src="http://wiki.developers.facebook.com/images/6/6f/Connect_iphone.png"></a>