I am following everything from the documentation: http://dev.twitter.com/pages/sign_in_with_twitter
I am working on a rails app and this is how my code looks like (code below uses oauth ruby gem):
@consumer=OAuth::Consumer.new("key" , "secret", {:site=>"https://
api.twitter.com"})
@request_tok...@consumer.get_request_token(:oauth_callback =>
"#{SITE_BASE}/callback")
redirect_to
@request_token.authorize_url().gsub("authorize","authenticate")
URL generated is: https://api.twitter.com/oauth/authenticate?oauth_token=_REQUEST_TOKEN_
I am already logged in to twitter.com and have authorized the app. But it displays the authorize screen: Authorize Twoo Dev to use your account?
All I do is reload the page and it takes me to my application's callback.
I have also used omniauth gem and had the same issue, hence I moved to oauth.
Please suggest what might be going wrong.
Regards, Aditya
Following is the header information for the authenticate url:
Response Headersview source
Date Mon, 20 Jun 2011 00:48:13 GMT
Server hi
Status 200 OK
X-Transaction
Etag ""-gzip
X-Frame-Options SAMEORIGIN
Last-Modified Mon, 20 Jun 2011 00:48:13 GMT
X-Runtime 0.06452
Content-Type text/html; charset=utf-8
Pragma no-cache
X-Revision DEV
Expires Tue, 31 Mar 1981 05:00:00 GMT
Cache-Control no-cache, no-store, must-revalidate, pre-check=0, post-
check=0
X-MID
Set-Cookie lang=en; path=/ lang=en; path=/ _twitter_sess=;
domain=.twitter.com; path=/; HttpOnly
Vary Accept-Encoding
Content-Encoding gzip
Content-Length 2936
Keep-Alive timeout=15, max=100
Connection Keep-Alive