Created
August 15, 2012 01:30
-
-
Save bitmaybewise/3354579 to your computer and use it in GitHub Desktop.
Twitter API
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 "rest_client" | |
require "json" | |
# usando API do twitter para recuperar ultimos 3 twitts de @hlmerscher | |
url = "https://api.twitter.com/1/statuses/user_timeline.json?include_rts=true&screen_name=hlmerscher&count=3" | |
data = JSON.parse( RestClient.get url ) | |
# imprimindo cada twitt | |
data.each {|twitt| puts "#{twitt['text']}" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment