Created
May 30, 2010 07:40
-
-
Save danwrong/418863 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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