I have a tweepy tweet object and I can see and print its favorite_count
and retweet_count
but I do not see a like_count
when I print the member variables of the object. Knowing the number of favorites seems a lot less relevant for typical use cases of working with a tweet as it is far more common to like something on Twitter than to favorite it.
I am able to do something like this:
api = tweepy.API(auth)
tweet = api.get_status(tweet_id)
print(tweet.retweet_count)
print(tweet.favorite_count)
but doing
print(tweet.like_count)
Does not work and I can't see any alternative. Furthermore when I google things like "tweepy get like count of a tweet" nothing relevant pops up which just seems odd. How can I do this?
To find the total number of likes of any tweet, click or tap on the tweet. Under the tweet text, you'll see a number next to a heart icon. That number represents the number of likes the tweet received.
Likes are represented by a small heart and are used to show appreciation for a Tweet. You can view the Tweets you've liked from your profile page by clicking or tapping into the Likes tab.
– For access token, click ” Create my access token”. The page will refresh and generate access token. Tweepy is one of the library that should be installed using pip. Now in order to authorize our app to access Twitter on our behalf, we need to use the OAuth Interface.
If you need more than 100 Tweets, you have to use the paginator method and specify the limit i.e. the total number of Tweets that you want. Replace limit=1000 with the maximum number of tweets you want. Replace the limit=1000 with the maximum number of tweets you want (gist).
Favourites are the same as likes. There is no difference. Clicking on a heart on Twitter increments the favourite count.
https://twittercommunity.com/t/hearts-and-likes-are-live/55642
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With