I have website where users can login with their Facebook account.
I am using javascript FB.login method to display Facebook login dialog. By default, it triggers displaying new popup window. Many users have forbidden popups in their browser. How to force facebook login dialog to be displayed in the same window where the user clicked on Login button?
I can see that it works on this website
When user click on Login button, he is redirected to facebook. After he login to FB, he is redirected back to the original website. Everything in the same browser tab.
See: https://developers.facebook.com/docs/reference/dialogs/oauth/
Rather than using the FB.login(), just add a link to your page like this:
<a href="https://www.facebook.com/dialog/oauth/?client_id=YOUR_APP_ID&redirect_uri=YOUR_REDIRECT_URL&state=YOUR_STATE_VALUE&scope=COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES">LOGIN!</a>Facebook will then log the user in and redirect them back to your URL with some goodies on the querystring: