Twitter @Anywhere oauth_bridge_code
Posted
by
AngelCabo
on Stack Overflow
See other posts from Stack Overflow
or by AngelCabo
Published on 2011-01-03T03:48:17Z
Indexed on
2011/01/03
3:53 UTC
Read the original article
Hit count: 270
ruby-on-rails
|twitter-oauth
I'm having trouble with Twitter's implementation of an oauth_bridge_code for the @anywhere api. I've seen a few walkthrough's on how to use this functionality but I can't seem to get the request to work for me. I'm using Ruby on Rails with the oauth gem. My code is as follows:
def callback
consumer = OAuth::Consumer.new(APP_CONFIG['twitter_key'], APP_CONFIG['twitter_secret'],
:site => "http://api.twitter.com",
:request_token_path => "/oauth/request_token",
:authorize_path => "/oauth/authorize",
:access_token_path => "/oauth/access_token",
:http_method => :post)
request = OAuth::AccessToken.new consumer
json = request.post("https://api.twitter.com/oauth/access_token?oauth_bridge_code=#{params[:oauth_bridge_code]}")
end
I keep getting 401 unauthorized responses from the signed post request even though this is supposed to be working according to this walkthrough: http://blog.abrah.am/2010/09/using-twitter-anywhere-bridge-codes.html and a presentation from Matt Harris on slideshare.
Any ideas on what I'm doing wrong (besides possibly trying to hit functionality that may not be in place)? Greatly appreciated!
© Stack Overflow or respective owner