Reputation: 3345
Afternoon everyone,
I'm trying to retrieve some twitter mentions using the rails Twitter gem. Retrieving favourite tweets is pretty straightforward, thanks to Ryan Bates;
Twitter.favorites("your_twitter_screen_name", count: 5).each do |tweet| etc...
However, when trying to do the same for mentions, which seems to have the same options in the documentation as favorites, it errors out with with;
undefined method `each' for "bestluxuryhotel":String
(also after removing the each block )
Does anyone know how to correctly enter the mentions options and format?
thanks in advance, Andy
Upvotes: 0
Views: 403
Reputation: 2020
Also the reason that the each block does not work is because you are returned a stringtype instead of an hash or array.
Take a look at the following: https://dev.twitter.com/docs/api/1/get/statuses/mentions
Have fun
Upvotes: 1
Reputation: 372
I'm not sure, but may be:
-Twitter.favorites("your_twitter_screen_name", count: 5).map do |tweet| etc...
Upvotes: 0