Skip to content

Instantly share code, notes, and snippets.

@danwrong
Created May 30, 2010 07:40
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 danwrong/418863 to your computer and use it in GitHub Desktop.
Save danwrong/418863 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'twitter'
oauth = Twitter::OAuth.new('ctoken', 'csecret')
oauth.authorize_from_access('atoken', 'asecret')
twitter = Twitter::Base.new(oauth)
annotations = [
{:coffee => {:temperature => "hot", :effectiveness => "crack"}},
{:music => {
:url => "http://www.last.fm/music/Apocalyptica/_/Ruska",
:artist => "Apocalyptica",
:title => "Ruska",
:album => "Apocalyptica"
}
},
{:sentiment => {:mood => "sated"}}
]
twitter.update(
'Sex and the City 2: "Essentially a home video of gay men playing with giant Barbie dolls." http://bit.ly/satc2-stranger',
:annotations => annotations.to_json
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment