Popup blocker fail


#1

I’ve followed all the steps to get an access token for my application. I’m stuck in the part when i have to authorize the app:

One of the steps of the process gave me this address:

http://twitter.com/oauth/authorize?oauth_token=3yjU8ux5CZ30wF5yQkPq0drvIrSEZWiukq1zjIoxxx

If i open it in a browser, it’s the common page showing “Authorize” or “Cancel”, but i want to show that page in a popup (like ALL the pages do), but if i use a javascript like: window.open(url) the popup blocker from my browser prevents the popup from showing. How do i solve this problem?

Thanks!


#2

Popups are typically blocked by browsers unless they occur in an event handler which has been triggered by a user-initiated event like a click.

What you would probably want to do is open a popup to a local page which will trigger fetching the request token, redirect the popup to Twitter, and then grab the oauth_verifier when the user gets redirected back, then close itself. The javascript code would look something like the following if you didn’t care about IE7 or lower:

var a = document.getElementById("#anchor-id"); a.addEventListener("click", function (evt) { window.open(...); }, false);

#3

I’ve got the same problem. We’d alredy an specific function to share some of our content by facebook, linkedin and twitter. Everything works fine but twitter. This last one is block by the browser (any browser we use), and the methode we use with the three share functions is the same window.open(url). Why does it happens only with twitter and how could I resolve it?? We’ve got support for IE6, 7 and 8 as well…

Thanks!


#4

Did you ever get a reply from the Twitter team on this issue?