简体   繁体   中英

window.opener null after redirect?

So I'm adding a "sign in with Twitter" button onto my 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!

Maybe you could use a lightbox containing an iframe for the Twitter sign-in. Then you can use "top" instead of "window.opener".

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM