oauth process for twitter. the difference between client and web application
- by Radek
I managed to make the oauth process work for PIN kind of verification. My twitter application is client type. When enter authorize url into web browser and grant the application access then I have to enter pin in my ruby application. Can I finish the process of getting access token without the pin thing?
My current code is like. What changes do I need to do to make it work without pin?
gem 'oauth'
require 'oauth/consumer'
consumer_key = 'w855B2MEJWQr0SoNDrnBKA'
consumer_secret ='yLK3Nk1xCWX30p07Id1ahxlXULOkucq5Rve28pNVwE'
consumer=OAuth::Consumer.new consumer_key,
consumer_secret,
{:site=>"http://twitter.com"}
request_token = consumer.get_request_token
puts request_token.authorize_url
puts "Hit enter when you have completed authorization."
pin = STDIN.readline.chomp
access_token = request_token.get_access_token(:oauth_verifier => pin)
puts
puts access_token.token
puts access_token.secret