Search code examples
twitter

Are Twitter's ID time ordered?


My question is whether Twitter's id associated to each tweet is time ordered, i.e. ids of more recent tweets are bigger numbers.

For instance: this tweet has an id of 623261510727561216, and was published at 12:41 AM - 21 Jul 2015

This other tweet has an id of 623260219477524481, and was published at 12:36 AM - 21 Jul 2015. IDs difference 623261510727561216−623260219477524481 = 1291250036735, a positive difference for a positive time difference.

The only thing I want to ascertain from this is just an order, which tweet was published first.


Solution

  • Twitter ids are time ordered. According to twitter doc, the full ID is composed of a timestamp, a worker number, and a sequence number. So basically the first part of the id is the timestamp, so it can be sorted by time. ( But I am not sure how many bits are used for timestamp for twitter ).