Skip to content

Instantly share code, notes, and snippets.

@runeb
Created January 12, 2010 12:11
Show Gist options
  • Save runeb/275136 to your computer and use it in GitHub Desktop.
Save runeb/275136 to your computer and use it in GitHub Desktop.
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