Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created July 23, 2013 18:36
Show Gist options
  • Save ashaw/6064944 to your computer and use it in GitHub Desktop.
Save ashaw/6064944 to your computer and use it in GitHub Desktop.
# http://rcbth.com/p/getting-an-oauth-token-for-your-twitter-bot
require 'rubygems'
require 'twitter_oauth'
client = TwitterOAuth::Client.new(
:consumer_key => 'BUH',
:consumer_secret => 'BUH'
)
request_token = client.request_token
puts "#{request_token.authorize_url}\n"
puts "Put in your pin when you get it."
pin = gets.chomp
access_token = client.authorize(
request_token.token,
request_token.secret,
:oauth_verifier => pin
)
puts access_token.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment