Hi, I authenticate with twitter oauth using a popup from my site. When the authentication is done, twitter redirects the user to my site again. The user then has my site both in the original browser window, and in the popup.
I want to close the popup automatically, so the user don't have to. I do this with the following: <?php if (strlen($_GET['oauth_token']) > 0) { echo "<script>self.close ()</script>"; } ?> The problem is that when using the above code, the authentication don't seem to work. When trying to tweet I get this: /statuses/update.xml Could not authenticate you. When I don't use the above code, and thereby force the user to close the popup manually if he don't want it open, everything works fine. Can someone explain this to me, and help with how I can auto close the popup without messing with the authentication? Thanks