Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get a tweet's favorite count?

Tags:

twitter

I couldn't find how to do this through the API documentation.

like image 499
Xavier Avatar asked Jan 23 '11 18:01

Xavier


2 Answers

There is an undocumented way to get this information if you're authenticated.

https://api.twitter.com/i/statuses/[tweet.id]/activity/summary.json

An even larger list of API endpoints that are undocumented can be found in the Ruby Twitter library https://github.com/sferik/twitter/blob/master/lib/twitter/client.rb

like image 126
mmrobins Avatar answered Sep 21 '22 01:09

mmrobins


The New API V1.1 Now supports the tweet favorite's count. Here try it out

stdClass Object
        (
            [created_at] => Thu Apr 04 20:09:16 +0000 2013
            [id] => 319904523520983041
            [id_str] => 319904523520983041
            [text] => North Koreas perspective of the world in the next 5 years http://t.co/MxRgD00VCY
            [source] => web
            [truncated] => 
            [in_reply_to_status_id] => 
            [in_reply_to_status_id_str] => 
            [in_reply_to_user_id] => 
            [in_reply_to_user_id_str] => 
            [in_reply_to_screen_name] => 
            [geo] => 
            [coordinates] => 
            [place] => 
            [contributors] => 
            [retweet_count] => 7
            [favorite_count] => 7
            [entities] => stdClass Object
                (
                    [hashtags] => Array

Upgrade and start Using it.

like image 24
Herbert Musoke Avatar answered Sep 20 '22 01:09

Herbert Musoke