I’m trying to to load facebook auth page for users to connect their fb accounts with my site. The problem is it’s a different domain. Code is as below
var left = (screen.width/2)-(550/2);
var top = (screen.height/2)-(250/2);
fbPopUp = window.open(authorizeURL,'fbWindow','menubar=0,status=0,titlebar=0,toolbar=0,resizable=1,width=400,height=275, top='+top+' , left='+left);
How do I find out whether this window actually opened or not?
I tried solution of Detect blocked popup in Chrome
Basically there’s a bug in Chrome. Although it hides the popup, it still executes and you still get the window object back – so regular checks don’t work.
Here’s the solution that worked for me:
Working example here: http://jsbin.com/uticev/3/