Too many redirects Login problem


I want to get OAuth tokens from users who authorize my application. But when I send them to and user accepts it by clicking on “Sign In” button, then Twitter says “Redirecting you back to the application” and redirects to “” where it gets to infinite loop. Browser shows HTTP Error 310 (too many redirects) and never redirects me back to my application.

Would anyone know where could be a problem?

Thanks a lot.



What value are you passing as oauth_callback when calling /oauth/request_token? It seems like you may have a placeholder (“OAUTH_CALLBACK”) in your code…


Um, nothing I’m afraid. I use some PHP library and the url by which it redirects me to Twitter is: Adding oauth_callback param to it ( doesn’t help. But I have specified callback url in my Twitter app so I thought that I don’t have to send it again.


The oauth_callback parameter needs to be sent to /oauth/request_token, not /oauth/authenticate. Double check that you haven’t missed some configuration option for the library you’re using - if you can post the initialization code and which library you’re using, that would be helpful.


You’re right of course. I’m sorry, I should have looked to the library’s code first, it has quite confusing documentation. Now it works perfectly. Thanks a lot for your advice!


I’m using Elliot Haughin Library, I have the same problem returning back to my application, after login twitter returns me to
I see errors in the query string itself, but I’m not sure it was really the error.
Any help,
Thanks a lot.


Ok, I found the solution!
It was the query string must be disabled i the config file


Hey everyone!!
I am using “T.signIn()” function to login.
when i call this function a popup is opened allowing the user to sign in with his twitter account.
After signing, the popup is closed and nothing happen.
The problem is that I need to ‘refresh’ my page to be able to get the Twitter response (screen name, image …).
what did i do wrong??can anyone help me??!!