Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View generate_twitter_oauth_url.rb
1 2 3 4 5 6 7 8 9 10
def generate_twitter_oauth_url
oauth_callback = "http://#{request.host}:#{request.port}/oauth_account"
 
@consumer = OAuth::Consumer.new("your-consumer-key","your-consumer-secret", :site => "https://api.twitter.com")
 
@request_token = @consumer.get_request_token(:oauth_callback => oauth_callback)
session[:request_token] = @request_token
 
redirect_to @request_token.authorize_url(:oauth_callback => oauth_callback)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.