Question: Why doesn't Firefox like the Facebook login popup?
Customization: I will implement the Login function for JavaScript on a website. I copied the sample code directly and configured it on the local web server for testing. The only thing I changed from the sample code is what I added appIdfor my application.
History: When I access the code in a browser, I see the Facebook login button, as expected. In Chrome and Safari, when I click the Login button, I get a popup that allows me to enter my Facebook credentials. However, in Firefox (v26.0), a pop-up window tries to open, but then disappears. I would say that it is blocked by Firefox, but usually Firefox tells me something that it blocks. In this case, the pop-up window unceremoniously just leaves. ( Capturing video of a disappearing popup. )
What I tried: I tried this in other browsers without problems. I made sure that the sample code has not changed except appId. I watched the message console and did not see anything unusual. The popup uses the following URL:
// wrapped for reading convenience
https://www.facebook.com/dialog/oauth?
scope=
&response_type=none
&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Freturn
%2Farbiter%3Frelation%3Dopener%26close%3Dtrue%23origin
%3Dhttp%253A%252F%252Ftestsite.dev%253A8090%252Ff327c2a561b678
&seen_v4_nux=false
&state=f3da5377afecdda
&app_id=012345678901234 // obviously obfuscated
&display=popup
If I paste this URL into the address bar of Chrome or Safari, I get a login dialog. If I paste this URL into the address bar of Firefox, I get a seemingly blank window. Viewing the source shows the following:
<script>
(function _(a,b,c,d,e){
document.domain='facebook.com';
var f=window[a];
if(f)
if(window.location.protocol==b
{if(!f.closed)f.require('Arbiter').inform('platform/dialog/response',d);}
else if(f.postMessage)
{if(!b.match(/^https?:$/)||!c.match(/\.facebook\.com$/))
throw new Error('Invalid Origin: '+b+'//'+c);
f.postMessage('FB_DIALOG_RESPONSE:'+JSON.stringify(d),b+'//'+c);
}e&&window.close();})
("opener", "https:", "www.facebook.com", {
"error_code":901,"error_message":"This app is in sandbox mode.
Edit the app configuration at http:\/\/developers.facebook.com\/apps
to make the app publicly visible.","state":"f97b48e573c33"}, true
);
</script>
If I disconnect from the Internet and click the "Login" button, the pop-up window will remain, but completely blank, except for the URL that it is trying to download (see above).
Additional Information: I am using Mac OS X.