Created
August 18, 2011 16:25
-
-
Save bluefuton/1154445 to your computer and use it in GitHub Desktop.
Grab last 200 tweets
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 'json' | |
require 'net/http' | |
require 'cgi' | |
twitter_user = 'agencyrepublic' | |
url = "http://twitter.com/statuses/user_timeline/#{twitter_user}.json?count=200&include_rts=1" | |
resp = Net::HTTP.get_response(URI.parse(url)) | |
results = JSON.parse(resp.body) | |
results.each do |result| | |
puts CGI.unescapeHTML(result['text'].chomp('"').reverse.chomp('"').reverse) + "\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment