I would like to implement the “Login with facebook” feature on my website and I am using the server-flow authentication. I have no problem generating the login link from the server side:
<a href="<?php echo $loginUrl ?>">Login with Facebook</a>
But as you can see, unlike the login button generated by the javascript SDK, when clicking on this link, it will not automatically popup the login dialog.
It’s not difficult to write my own codes to emulate such behavior but it feels better to follow the official codes since it should have been well-tested.
However, looking in the facebook javascript SDK,
https://github.com/facebook/facebook-js-sdk
I can hardly find the codes it use to popup the login dialog.
Where do you think the codes are located in the repository?
see http://www.fbrell.com/auth/login-and-logout and http://developers.facebook.com/docs/reference/javascript/FB.login/
on a side-note: the login is always a popup window not a modal window. this is intended behavior.