Hi, I am coding in ROR (Ruby on Rails) using the ‘twitter’ gem (https://github.com/sferik/twitter)
I have authenticated successfully. With the code below: (The Twitter Streaming API)
@twitter_rest = Twitter::Streaming::Client.new do |config|
config.consumer_key = "CONSUMER_KEY"
config.consumer_secret = "CONSUMER_SECRET"
config.access_token = "ACCESS_TOKEN"
config.access_token_secret = "ACCESS_SECRET"
end
Now i am using the filter method to grab tweets contains the string “Search_Word”, code below:
@twitter_rest.filter(:track => "Search_Word") do |tweet|
TwitterData.create(:tw => tweet)
I am pushing the tweets into a model called “Twitter_Data” to “tw” column.
The filter command returns the tweet content.
How do i get for each tweet the User ID or Screen name???
Thanks,