Skip to content

Instantly share code, notes, and snippets.

@n-shinya
Created August 28, 2014 10:06
Show Gist options
  • Save n-shinya/35b7d1c3be628fed5809 to your computer and use it in GitHub Desktop.
Save n-shinya/35b7d1c3be628fed5809 to your computer and use it in GitHub Desktop.
require 'twitter'
client = Twitter::Streaming::Client.new do |config|
config.consumer_key = 'xxx'
config.consumer_secret = 'xxx'
config.access_token = 'xxx'
config.access_token_secret = 'xxx'
end
client.filter(track: 'xxx') do |obj|
puts obj.text if obj.is_a?(Twitter::Tweet)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment