views:

641

answers:

1

I have a web application that is integrating with Twitter's OAuth API. I registered my application with Twitter putting my application's homepage as the callback URL intending to use the oauth_callback querystring parameter to define the actual callback URL. The reason I can't just enter it in with the Twitter application form is because I plan to generate the URL dynamically based on several variables so it is not possible to for me enter the true desired URL in Twitter's application form.

When I ran the application Twitter redirected me back to my application homepage instead of the dynamic URL I passed through the oauth_callback. I even tested this using oauth_callback=http://www.google.com instead of generating it just to avoid the possibility of an invalid URL. I also tried "oauth_callback=" + Server.UrlEncode("http://www.google.com") just in case it wasn't liking the special characters. Still it ignores oauth_callback and just redirects me back to my application homepage.

I've read a dozen blogs on this issue. Some say that oauth_callback was disabled back in May 2009 while others say it was re-enabled in June 2009.

For what it's worth I'm running this off of localhost but I don't see this being an issue because oauth_callback wouldn't even work when it was set to google.com

A: 

Pass oauth_callback={$url} when you get your request_token. Along with the request token will be oauth_callback_confirmed=true.

This is the specified flow in OAuth 1.0a.

You can read more about it here http://groups.google.com/group/twitter-api-announce/browse%5Ffrm/thread/472500cfe9e7cdb9?hl=en

abraham
That's actually my point. I'm doing what this article says and it's not using the oauth_callback parameter. It just ignores it and uses whatever I typed as my callback URL when I registered my application.
Adam
Is oauth_callback_confirmed being returned?Have you tried creating a temporary OAuth application on Twitter.com to see if Twitter has a weird caching issue with your current callback URL?
abraham

related questions