Are you by chance passing anything in to the request_token call
for the value of oauth_callback? I checked out a few other services
and they seemed fine. If you're sending oauth_callback=oob (a.k.a.
"out of band") then the system is forced into the PIN flow. We're
working on docs for all of this now but let me know if that's what
you're sending.
— Matt
I just checked the tokens generated on several of these services
and I see oauth_callback was set to "oob". Doug is working on the docs
right now to make it clear how all of this shakes out. The end result
is that if you want to use the pre-configured callback url don't send
an oauth_callback parameter at all. If you're seeing this error but
are not sending the oauth_callback parameter please email me off list
with a copy of the URL, headers and body where you make the
request_token call so I can try and debug the issue. It doesn't seem
to be all apps which is what I would expect in the case of a bug.
Thanks;
– Matt Sanford / @mzsanford
Twitter Dev
Try logging in at http://moodmapr.com to see what happens
I have commented out all the lines of code that pass 'oauth_callback'
in the url on my development environment and it doesn't seem to make a
difference
https://twitter.com/oauth/authorize?oauth_token=TOKEN
or as it used to be (and is in production)
https://twitter.com/oauth/authorize?oauth_token=
TOKEN&oauth_callback=http%3A%2F%2Fmoodmapr.local%2Foauth_callback
My app is a ruby app (rails) using the twitter-auth gem (0.1.21) and
oauth (0.3.5)
Again everything was perfect until a few hours ago was seems to
coincide with everyone else having this issue
Nobody is forcing you to use the PIN unless you're registered as
a desktop app (which has no callback). The issue here is that the
library you are using is setting a value of "oob" and specifically
requesting the PIN flow. I have filed an issue with the gem maintainer
on github [1] and hopefully the default can be changed. You can get
around this right now by passing the callback into your
get_request_token call as described in one of my previous emails.
Thanks;
– Matt Sanford / @mzsanford
Twitter Dev
[1] - http://github.com/mojodna/oauth/issues#issue/7
>
> Quick fix/patch/hack for the Ruby OAuth gem - just load this after
> the gem is loaded. A Rails initializer will work.
>
> http://gist.github.com/127313
I still have problems - even with this gist above!!
I'am using oauth-gem 0.35.
I always get a 401 error!!!!
How to deal with "oauth_verifier"??? Do I need special database fields
to store it?
def self.consumer
OAuth::Consumer.new("XXXX", "XXXX", { :site=>"http://
twitter.com" })
end
def sign_in
@request_token =
UsersController.consumer.get_request_token(:oauth_callback => "http://www.xxx.de/callback
")
session[:request_token] = @request_token.token
session[:request_token_secret] = @request_token.secret
redirect_to @request_token.authorize_url
return
end
def callback
@request_token =
OAuth::RequestToken.new(UsersController.consumer,
session[:request_token], session[:request_token_secret])
@access_token = @request_token.get_access_token
@response = UsersController.consumer.request(:get, '/account/
verify_credentials.json', @access_token, { :scheme => :query_string })
....
....