Get all replies of a tweet


#1

I want to get all replies for specific status(tweet), I tried
status.getInReplyToStatusId
but it gave me -1,

and tried
status.getInReplyToScreenName and it gave me null value
so, how I can have all replies of the tweet

thanks


#2

There’s not a good general solution to this problem using the Twitter API I’m afraid.


#3

thanks for reply,
is there any solution to do that ???

thanks


#4

You could do a couple of things here. Let’s say you identify a tweet from @foo which you want to find replies to. You could

  1. Poll the search REST API with a query “to:foo”, then filter the results by matching in_reply_to_status_id to the tweet of interest.
  2. Do essentially the same, but use the “filter” streaming API (with track parameter) to gather the potential replies.

It’s not ideal, and you’ll have to do extra work to get replies-to-replies, but some have had success using this method.


#5

thanks for help