is there a problem getting favorite_count

20 views
Skip to first unread message

Nilanjan Bhattacharya

unread,
Aug 3, 2013, 12:15:05 PM8/3/13
to twitter-...@googlegroups.com
I am trying to get favorite_count for a tweet.  It seems to return nil.

If I get the tweet using status(tweet_id) in irb, I can see the values of favorite_count (using pp).  However, if I print tweet1.favorite_count, I get nil.

Here is a sample tweet: 342633710023237632
Favorite count is 5

This happens for all tweets.

Thanks,
- Nilanjan

sferik

unread,
Aug 5, 2013, 6:58:27 AM8/5/13
to twitter-...@googlegroups.com
I’m not sure exactly what is causing this problem but it seems to be fixed in the latest code on GitHub. This code has not yet been released in a gem but is stable enough to use in production. You may use it by adding the following line to your Gemfile:

gem 'twitter', :git => 'https://github.com/sferik/twitter.git'

Before you upgrade to this version, be sure to read the “What’s New in Version 5” section of the README.
Reply all
Reply to author
Forward
0 new messages