Create a gist now

Instantly share code, notes, and snippets.

@ahmdrefat /example2.rb Secret
Created Nov 12, 2012

What would you like to do?
# Applications that make requests on behalf of a single Twitter user can pass global configuration options as a block to the Twitter.configure method.
Twitter.configure do |config|
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
config.oauth_token = YOUR_OAUTH_TOKEN
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET
# After configuration, requests can be made like so:
Twitter.update("I'm tweeting with @gem!")
# Follow a user
# Fetch a user
# User timeline
# Search"to:ahmdrefat ruby on rails", :count => 5, :result_type => "recent") do |status|
"#{status.from_user}: #{status.text}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment