Getting blank page from OAuth authorize URL


Hi everyone

I’ve seeking for a solution of this problem since 3 months.

I have an application which uses Struts (Java Framework) and tries to connect to Twitter. I’m also using Twitter4j library.

Everytime I request a token for authorize an user, I get this URL:

When I redirect, using the sendRedirect method from the HttpServletResponse class, this URL shows nothing. When I copy this URL into another tab or browser window it shows with no problem at all.

Is this a bug coming from Twitter or am I doing something wrong?

Please help.



I’am in the same conditions Struts + Twitter4j, I am also using the sendRedirect but I doesn’t have this problem.
The only difference is that I open the page in a popup.


What web browser are you using when this happens? When you issue the web-based redirect, are there any additional parameters or HTTP headers that get attached to the request? Could you try this through a proxy so you could monitor the actual traffic being sent in response to the redirect? How many seconds/milliseconds pass between getting the request token and sending the user to the authorize page? (shouldn’t make a difference but just asking)


I was seeing this same problem using sample code (just thought I’d put the answer in case anyone needs it). I was being redirected to the access_token url rather than the authorize url. Turns out my DefaultOAuthProvider was setup incorrectly. It should be:

new DefaultOAuthProvider( request_token_url, access_token_url, authorize_url);


same problem but with php