Skip to content

Instantly share code, notes, and snippets.

@nov
Created August 27, 2014 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nov/fb9ba939669b9fab5f77 to your computer and use it in GitHub Desktop.
Save nov/fb9ba939669b9fab5f77 to your computer and use it in GitHub Desktop.
require 'oauth'
callback_url = 'http://example.com/callback?foo=bar&reg_code=123&copy_code=456'
request_token = OAuth::Consumer.new(
'<CONSUMER-KEY>',
'<CONSUMER-SECRET>',
site: 'https://api.twitter.com'
).get_request_token(
oauth_callback: callback_url
)
`open "#{request_token.authorize_url}"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment