Extremely relevant:
http://code.google.com/p/facebook-actionscript-api/issues/detail?id=256
Specifically:
I’ve discovered that popups are blocked unless triggered by a user
action, e.g. a button click. So the solution to this problem is to
only call Facebook.login() from a MouseEvent.CLICK handler.
However on my website, this is what I do and the popup is still blocked:
$('#fb-login-button').click(function () {
FB.logout();
setTimeout(function() {
FB.login();
}, 2000);
});
Is it because the FB.login() call is being invoked by the setTimeout() function and not directly in the click handler?
Any suggestions?
Yes, browser blocks your popup because of setTimeout call.
if you remove setTimeout it won’t be blocked.
great explanation is here:
https://stackoverflow.com/a/7060302/384442