Search code examples
rubyrubygemstwittertwitter-gem

Return authenticated users favorites list with twitter gem


I'm looking at creating a project where I would like a user to login and then it will return all their tweets from a specific time duration.

I have seen that it is possible using the twitter Api, but as I'm planning to use the twitter gem I would of assumed it can do this as well. However, when I look at the docs for favorite they seem to just be writing actions not reading.

I noticed there there is a method called Twitter.mentions_timeline but can't find it anywhere in the docs. I'm wondering if there would be a similar one for Twitter.favorites_timeline but can't find anything in the docs.

Any guidance would be great.


Solution

  • There is a call Twitter.favorites. It's not a timeline but that should contain the data you need.

    See how the twitter gem is doing it and the Twitter API documentation.