Skip to content

Instantly share code, notes, and snippets.

@twoism
Created August 22, 2012 01:29
Show Gist options
  • Select an option

  • Save twoism/3421226 to your computer and use it in GitHub Desktop.

Select an option

Save twoism/3421226 to your computer and use it in GitHub Desktop.
require 'twitter'
require 'json'
require 'pp'
Twitter.configure do |config|
config.consumer_key = ""
config.consumer_secret = ""
config.oauth_token = ""
config.oauth_token_secret = ""
end
# https://github.com/sferik/twitter/blob/master/lib/twitter/client.rb
client = Twitter::Client.new()
resp = client.get("/1/users/show.json?screen_name=twoism")
body = resp[:body]
json = JSON.pretty_generate(body)
pp json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment