Skip to content

Instantly share code, notes, and snippets.

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