Skip to content

Instantly share code, notes, and snippets.

@kimihito
Created February 13, 2013 14:02
Show Gist options
  • Save kimihito/4944810 to your computer and use it in GitHub Desktop.
Save kimihito/4944810 to your computer and use it in GitHub Desktop.
Twitterの特定のハッシュタグをストリーミングAPIを使って所得する
#!/usr/bin/env ruby
#-*- coding: utf-8 -*-
require 'tweetstream'
require 'uri'
TweetStream.configure do |config|
config.consumer_key = 'YOUR_CONSUMER_KEY'
config.consumer_secret = 'YOUR_CONSUMER_SECRET'
config.oauth_token = 'YOUR_OAUTH_TOKEN'
config.oauth_token_secret = 'YOUR_OAUTH_SECRET'
config.auth_method = :oauth
end
client = TweetStream::Client.new
client.track("#HASHTAGS") do |status|
#do something
end
end
client.userstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment