-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Favorited state in search is always false #1233
Comments
Adding additional indirect API requests to a discrete method that matches a specific endpoint is not something that Tweepy should do. Tweepy serves as an interface to the API and the limitations of it aren't necessarily in the purview of or part of the responsibility of the library to mitigate. Specifically, modifying the data returned from an API request would be bad practice, as it is not something a user would normally expect from any of the methods. It would also be a breaking change and be susceptible to breakage from any attempts by Twitter itself to rectify the limitation. However, I do agree that this is an obscure limitation that's not properly documented at all by Twitter. Feel free to PR the addition of a note about it in the documentation for |
@lg188 I've found a workaround for this.
|
I've just encounter the same problem, searching on google I've found out that Here is the thread where I've found the problem explained https://twittercommunity.com/t/favorited-reports-as-false-even-if-status-is-already-favorited-by-the-user/11145/, they also say that the best workaround seems to be the one posted by @Freyja-Folkvangr. |
Please don't necro-bump old closed issues. @thekillgfx That is the same thread that is linked in this issue and that was added to the documentation with 1ab1519, the commit that closed this issue. The relevant Twitter API documentation you're referencing was also added to Tweepy's documentation in that commit. As for Twitter API v2 support, see #1472. |
Here is my fix for tweepy4.1, hope this helps someone
|
I've been trying to use the
status.favorited
variable of a status retrieved byapi.search
but it was always false. When trying to favorite this tweet it gave me exceptions with a message that that tweet was already favorited. After some help from the discord, I've discovered that this is fault on the twitter API itself [1]. My suggestion is to internally cross reference with a user's favorites to mitigate this.As a developer, this was not a fun experience and I want to prevent this from happening to others.
[1] https://twittercommunity.com/t/favorited-reports-as-false-even-if-status-is-already-favorited-by-the-user/11145
The text was updated successfully, but these errors were encountered: