Closed spencer17x closed 6 months ago
For example, the type of tweet has retweets, comments, etc., which field indicates that the tweet message belongs to that type
Unfortunately, Twitter does not make any distinction regarding the type of tweet. All comments, retweets, etc are all treated as tweets. To check what "type" of tweet it is, you have to manually inspect the fields of the tweet.
For example, if a tweet is a reply, it's replyTo
field will be non-null. Similarly, if a tweet is a quoted field will be non-null and so on.
Why can't tweet.search get retweets
That's how the search endpoint works on Twitter, unfortunately.
Ig twitter treats retweets as non-original tweet, since all the user did was share someone else's tweet. Quotes and replies on the other hand, however, also include additional input from the user, so they are considered as "original" tweets. That's just how Twitter works.
Which api should I call if I want to specify some user's retweets, likes, etc
For the likes, you can user the user.likes
method.
As for the retweets, although no direct method exists, but you can fetch the timeline of the user which contains the original tweets as well as retweets using the method user.timeline
. Then filtering out the original tweets by checking the id of the user who made the tweet will leave you with all the retweets.
Remember, this library is made by reverse engineering the API endpoints used by the Twitter Web App. So this library can only achieve what the Web App can do and nothing more.
For the likes, you can user the
user.likes
method.As for the retweets, although no direct method exists, but you can fetch the timeline of the user which contains the original tweets as well as retweets using the method
user.timeline
. Then filtering out the original tweets by checking the id of the user who made the tweet will leave you with all the retweets.Remember, this library is made by reverse engineering the API endpoints used by the Twitter Web App. So this library can only achieve what the Web App can do and nothing more.
If I have multiple users, it's not one request per user
For multiple users, you'll have to make individual requests.
I'm afraid I'll need a bit more explanation.