Skip to content

Instantly share code, notes, and snippets.

@alea12
Created May 7, 2013 01:07
Show Gist options
  • Save alea12/5529577 to your computer and use it in GitHub Desktop.
Save alea12/5529577 to your computer and use it in GitHub Desktop.
Using Twitter API by Ruby
require 'rubygems'
require 'twitter'
Twitter.configure do |config|
config.consumer_key = 'CONSUMER_KEY'
config.consumer_secret = 'CONSUMER_SECRET'
config.oauth_token = 'ACCESS_TOKEN'
config.oauth_token_secret = 'ACCESS_TOKEN_SECRET'
end
# Post to Twitter
Twitter.update("Hello, Twitter API!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment