-
-
Save ahmdrefat/56e1f5f2c77e8e92bb44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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