Skip to content

Instantly share code, notes, and snippets.

@walidvb
Created June 17, 2014 08:55
Show Gist options
  • Select an option

  • Save walidvb/c2062539cc20e5b75f03 to your computer and use it in GitHub Desktop.

Select an option

Save walidvb/c2062539cc20e5b75f03 to your computer and use it in GitHub Desktop.
def search(hashtag)
@client = Twitter::REST::Client.new do |config|
config.consumer_key = ENV["TWITTER_CONSUMER_KEY"]
config.consumer_secret = ENV["TWITTER_CONSUMER_SECRET"]
config.access_token = ENV["TWITTER_ACCESS_TOKEN"]
config.access_token_secret = ENV["TWITTER_ACCESS_SECRET"]
end
@client.search(hashtag).attrs[:statuses]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment