Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Favourites Rate Limit exceeded #82

Open
BorisAnthony opened this issue Jan 27, 2016 · 0 comments
Open

Favourites Rate Limit exceeded #82

BorisAnthony opened this issue Jan 27, 2016 · 0 comments

Comments

@BorisAnthony
Copy link

Hello!
Understanding that Tweetnest scans my Twitter Favourites ("Likes") for only my own tweets that I have Liked…
Twitter Rate Limits to 15 requests per 15 minutes on Favorites/Likes
https://dev.twitter.com/rest/public/rate-limits

The situation
At some point back in June, my cronjob failed for a few weeks. When I fixed it up again, there were more than 15 pages (woah) of Favorites for tweetnest to scan.
Because Tweetnest dieout() when the rate limit message is hit, it never completes its process of checking my Likes, pulling out those that are of my own tweets, saving them to the database, and resetting whatever marker that keeps it going back again next time.

End effect is I do not have self-liked tweets in Tweetnest updated anymore, and running loadtweets.php fails with "Rate Limit Exceeded" for Likes every time.

Imagined Fix
When Rate Limit is hit, instead of dieout() (line 215), catch the error, stop the requests, but process what has been retrieved and increment counter so that when the script is run 20 minutes later, it does continues where it left off.

I'm not sure my skills in PHP are good enough to do this, but I might try sometime if I can find time. Figured I'd post the issue here though. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant