I am using js sdk to login using <fb:login-button></fb:login-button> button
When I click “login” button on my page, the pop up box appears and disappears quickly.
I found this other thread on here
Facebook login window appears and disappears very quickly
Which explains that it happens because the user is already logged into facebook. My question is, how do I go around this issue?
if they are already logged in to facebook, how do I make sure the pop up doesn’t just appear and disappear?
You could check the user’s login status with FB.getLoginStatus.
https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/
If the user is not logged in you could display a (custom) login button.