Skip to content

Instantly share code, notes, and snippets.

@NeoCat
Created September 23, 2010 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeoCat/593872 to your computer and use it in GitHub Desktop.
Save NeoCat/593872 to your computer and use it in GitHub Desktop.
require 'oauth'
request = OAuth::RequestProxy.proxy(
"method" => 'GET',
"uri" => 'https://betastream.twitter.com/2b/user.json',
"parameters" => {
"oauth_consumer_key" => "******************",
"oauth_token" => "***-******************",
"oauth_nonce" => OAuth::Helper.generate_key,
"oauth_timestamp" => OAuth::Helper.generate_timestamp,
"oauth_signature_method" => "HMAC-SHA1",
"oauth_version" => "1.0"
})
request.sign!(
:consumer_secret => "******************",
:token_secret => "******************"
)
puts "URI: #{request.signed_uri}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment