Created
January 12, 2010 12:11
-
-
Save runeb/275136 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'rubygems' | |
require 'oauth' | |
KEY = "replace with your key" | |
SECRET = "replace with your secret" | |
consumer = OAuth::Consumer.new(KEY, SECRET, { | |
:site=>"https://www.google.com", | |
:request_token_path=>"/accounts/OAuthGetRequestToken", | |
:authorize_path=>"/accounts/OAuthAuthorizeToken", | |
:access_token_path=>"/accounts/OAuthGetAccessToken"}) | |
request_token = consumer.get_request_token( | |
{:oauth_callback => "http://runeb-oauth.heroku.com/session/create" }, | |
{:scope => "http://gdata.youtube.com"}) | |
request_token.token # The request token itself | |
request_token.secret # The request tokens' secret | |
request_token.authorize_url # The authorization URL at Google |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment