Skip to content

Instantly share code, notes, and snippets.

@bitmaybewise
Created August 15, 2012 01:30
Show Gist options
  • Save bitmaybewise/3354579 to your computer and use it in GitHub Desktop.
Save bitmaybewise/3354579 to your computer and use it in GitHub Desktop.
Twitter API
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