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?
- What changes do I need to do to make it work without pin?
- Could somebody tell me what is the different between client and web application in general? I'd say that it is the same once I get the access token.
My current code is like.
gem 'oauth'
require 'oauth/consumer'
consumer_key = 'your_key'
consumer_secret ='your_secret'
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