How can we access a discussion stream bottom-up?


#1

We’d like to fetch a discussion stream (tweet - reply - reply of reply - …) bottom up. So starting with the latest reply we’d like to traverse the tree up to the root tweet.
Our current implementation iterates manually, following the in_reply_to_status_id, loading each tweet/reply manually, until the top element is found.

So if there’s…

tweet #1
|-- reply #2
|-- reply #3
…|-- reply #4
…|-- reply #5

…and we have reply #5, we’d like to get…

tweet #1
|-- reply #3
…|-- reply #4
…|-- reply #5

This works, but it’s both very slow and consumes valuable requests against the rate limit.

Are there any alternatives ?