4 ms·
Show HN: Randomtweet.com – Reading a random tweet is surprisingly difficult
- ndehouche 5y agoThis weekend project turned out to be surprisingly non-trivial. First, you have all sorts of silly limitations in Twitter's API. You can only retrieve a maximum of 3200 tweets from a user's timeline, which for very active accounts only goes back a year or so. Moreover, Twitter forces you to get a minimum 5 tweets at each API calls, even if you need just one. But the most surprising to me was that there is no coherent indexing system in the tweets IDs. The best solution I found was to generate a random date and get the latest tweet posted before that date and juggle that with the 3200 tweets limitation. How would you guys go about retrieving one random tweet from a user's timeline?