Created
June 8, 2011 00:19
-
-
Save jhurliman/1013530 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the Facebook API | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : 'YOUR_APP_ID', | |
status : true, // check login status | |
cookie : true, // enable cookies to allow the server to access the session | |
xfbml : true // parse XFBML | |
}); | |
// Browser-specific hacks to make FB Connect more reliable | |
$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase()); | |
if ($.browser.chrome || $.browser.msie) { | |
FB.XD._origin = window.location.protocol + "//" + document.domain + "/" + FB.guid(); | |
FB.XD.Flash.init(); | |
FB.XD._transport = "flash"; | |
} else if ($.browser.opera) { | |
FB.XD._transport = "fragment"; | |
FB.XD.Fragment._channelUrl = window.location.protocol + "//" + window.location.host + "/"; | |
} | |
}; | |
(function() { | |
var e = document.createElement('script'); | |
e.async = true; | |
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; | |
document.getElementById('fb-root').appendChild(e); | |
}()); |
I tried proxying window.open, storing the handle to the FB popup, and calling close on it manually. No luck. I also traced the FB code and confirmed it was calling .close() at the appropriate time. Something strange is definitely going on; I can't find any documentation about .close() only working in certain states.
…On Nov 2, 2011, at 8:08 PM, ***@***.*** wrote:
Same here. Window still hangs on. Any solutions please?
##
Reply to this email directly or view it on GitHub:
https://gist.github.com/1013530
Ah, thanks for clearing that up. Guess we are at Facebook's mercy on this one.
…On Nov 21, 2011, at 1:28 AM, ***@***.*** wrote:
jhurliman this won't work as once the popup window has changed domains the window no longer can be controlled by the parent window for security reasons. Facebook are the people who have to return with the closing javascript.
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1013530
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Same here. Window still hangs on. Any solutions please?