Skip to content

Instantly share code, notes, and snippets.

@hnaohiro
Created January 20, 2013 22:09
Show Gist options
  • Save hnaohiro/4582142 to your computer and use it in GitHub Desktop.
Save hnaohiro/4582142 to your computer and use it in GitHub Desktop.
RubyでUserStreamsを使うサンプル
require 'tweetstream'
TweetStream.configure do |config|
config.consumer_key = '********'
config.consumer_secret = '********'
config.oauth_token = '********'
config.oauth_token_secret = '********'
config.auth_method = :oauth
end
client = TweetStream::Client.new
client.userstream do |status|
puts "#{status.user.name}: #{status.text}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment