window.opener null after redirect?
So I'm adding a "sign in with Twitter" button onto my开发者_如何学JAVA web site. I display the twitter sign in in a popup window. When the user signs into to twitter they are redirected back to a page on my site which calls a javascript function on the window.opener to notify the page that sign in has completed and to refresh.
The problem is after twitter redirects the user back to my site window.opener is null. The script works fine if I bypass the twitter sign in page. Also this appears to be a IE issue, as it works fine in firefox.
Any ideas?
Thanks in advance!
check window.opener is null after redirect. If you provide a page of your own domain in the popup first it doesnt loose is parent information. At least that how it works for me.
Maybe you could use a lightbox containing an iframe for the Twitter sign-in. Then you can use "top" instead of "window.opener".
精彩评论