See replys to a tweet

JackPointNL
@JackPointNL Jack Hage

It is possible to reply to a tweet. Is it also possible to see all replys to a tweet?

2 years 39 weeks ago

Replies

richardhyland
@richardhyland Richard Hyland

Yes send the in_reply_to_status_id parameter with the id of the tweet being replied to against the statuses/update endpoint (https://dev.twitter.com/docs/api/1/post/statuses/update).

I'm not aware of an API that gets all of the replies but you can query each one individually.

When reading the first tweet from statuses/show, read the in_reply_to_status_id field, then send that to statuses/show and repeat.

2 years 39 weeks ago
JackPointNL
@JackPointNL Jack Hage

Thanks for your answer.
The method you give me let me search up to parent tweets, to but i need to serach down to child tweets. To the replys. The twitter web also shows replys to a tweet. Do i need to add a screenshot here?

2 years 39 weeks ago
episod
@episod Taylor Singletary

Hi Jack,

We don't have a supported API for reading the conversation tree for a specific tweet at this time. However, this post from the old google group ( http://groups.google.com/group/twitter-development-talk/browse_thread/thread/cdc34ae78a2350b8 ) details a method called GET statuses/related_results that is an experimental API.

By experimental API, this means that until we officially document it on dev.twitter.com, it's not necessarily production-ready and could be unstable both in the parameters it takes and the format of its responses. It also may just disappear one day.

As for related_results itself, it won't necessarily return every reply for a tweet nor are its responses necessarily limited to just replies. That said, for your own personal use or experimentation you may find some utility in the method. If you choose to use it in any software you're developing, I would proactively wrap its use with significant exception handling.

2 years 39 weeks ago
JackPointNL
@JackPointNL Jack Hage

Thanks, ill try that one!

2 years 39 weeks ago
jufemaiz
@jufemaiz Joel Courtney

@episod any update to this? It's a fairly critical service.

2 years 6 weeks ago
BarnabyWalters
@BarnabyWalters Barnaby Walters

I've spent the last hour or so testing GET related_replies and have found it to be (as expected) unreliable and limited. It doesn't always get any related results (even when I replied to a tweet and got someone else to reply too, related_replies on all of them returned nothing), and on the rare occasions it does it only tends to get two tweets.

Interestingly if you add include_entities=0 to the end of the query string it returns annotations data which I believe is only supposed to be public to devs with accounts that support it. Whether or not it's of any use I have no idea.

It'd be great to have a nice simple way of getting all replies/related activity to a tweet. I'm holding out until there's a supported solution before I take the time to implement it though.

2 years 2 weeks ago
rurounijones
@rurounijones Jeffrey Jones

After doing some searching it appears that the first request for this feature occurred in 2008!
http://code.google.com/p/twitter-api/issues/detail?id=142

And yet Twitter STILL hasn't gotten around to implementing it yet despite repeated requests on various bug-trackers, lists and forums, the best they have done is the above mentioned experimental API call which doesn't do what we want anyway.

I think we can safely say anyone holding their breath for this feature should have a good life insurance policy.

Shame since it would be such an immensely useful feature; after 4 years I can only assume they are not implementing it for commercial reasons.

2 years 2 weeks ago
RichFoster2020
@RichFoster2020 Rich Foster

This seems so simple. Is this fixed yet?

1 year 37 weeks ago
SaschaSiemer
@SaschaSiemer Sascha Siemer

what about using "statuses/mentions" for all mentions and filter them by [in_reply_to_status_id] using the ID of the "parent" post? of course that only works if the replies are always mentions with the @username stuff in it. but if they dont have that, they can hardly be called replies right? ;)

let me know if you think there is something wrong with that approach please, because i am about to implement it that way. thx!

1 year 33 weeks ago
yingmossad
@yingmossad Ying Mossad

Hello @SaschaSiemer,

it seems that statuses/mentions retrieves only my mentions (the mentions of the autenticated user) and not the specific user mentions.

Simone

1 year 33 weeks ago
SaschaSiemer
@SaschaSiemer Sascha Siemer

ohw, i see. that makes sense somehow ;) thx for letting me know. i think for my purpose it should be good enough anyway.

1 year 33 weeks ago
ryanBANGSko
@ryanBANGSko ryan bang

This is not supported on api v1.1. Any alternatives?

1 year 31 weeks ago
omokwithok
@omokwithok Omkar Kuchekar

i want reply to particular tweet using api in c# anyone help which api should i use,but without going to twitter.com and also it is not being asked for login....plz help i need it urgently.

1 year 28 weeks ago
naveedqasim2
@naveedqasim2 naveed.qasim

i want chat room

1 year 25 weeks ago
JingboyG
@JingboyG POMPEYO GARDUQUE jr

all i want is to be rewarded.

1 year 25 weeks ago
JingboyG
@JingboyG POMPEYO GARDUQUE jr

my tweets when just like its done here.

1 year 25 weeks ago
JingboyG
@JingboyG POMPEYO GARDUQUE jr

i like it here very very very much.

1 year 25 weeks ago
pasometo
@pasometo Paso Meto

Is it possible to reply to a tweet using rest api v1.1. If yes can any one provide me the exact url.

1 year 5 weeks ago
burke142
@burke142 Adam Burke

This is why I've never really used twitter. I don't really get it...

46 weeks 6 days ago
nimorae
@nimorae Ana T.

I was asked to implement a feature: show user tweet + replies to it.

A few details:
1) the tweet was done from our system, so i have twitter id for the tweet
2) appropriate oauth tokens

My solution:
1) get mentions_timeline for the authenticated user (https://dev.twitter.com/docs/api/1.1/get/statuses/mentions_timeline)
2) for every tweet in mentions_timeline: find if this tweet comes in reply to a tweet that was done through our system, using in_reply_to_status_id param, if so save this tweet and connect it to relevant tweet in our system.

Tested this approach and it worked like a charm.

Second approach i didnt test yet, but i think it will work as well, is:
1) get user_timeline (https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline)
2) get user mentions_timeline and repeat as before, this time against user_timeline.

In this approach u still need user oauth tokens.

42 weeks 3 days ago
test4tweet
@test4tweet TestAcc

The related result doesnt seems to be supported anymore by the API v1.1. Any other alternatives?

38 weeks 6 days ago
alvarorivoir
@alvarorivoir Alvaro Rivoir

Any news on this?

22 weeks 3 days ago
martindale
@martindale Eric Martindale

+1 for anyone who has an alternative that works in API v.1.1...

15 weeks 6 days ago
thom_nic
@thom_nic Thom Nichols

I have a semi-OK workaround - I do a search like ...

?q=@(user who sent tweet)&since_id=(id of tweet)

... then look for a matching in_reply_to_status_id. Unfortunately it doesn't get the entire conversation (just first level of replies) but it's better than nothing. Now that I think of it, this is probably the same as querying statuses/mentions + searching for the in_reply_to_status_id.

Worst thing is, there is a 1.1 API method - you can dig it out of the Android client but they don't allow it from third-party OAuth clients, you'll always get a 401.

15 weeks 6 days ago
thom_nic
@thom_nic Thom Nichols

Here's the thread that discusses the "official" API method which is blocked from third-party clients: https://dev.twitter.com/discussions/17647

So it's there, Twitter Dev just needs to flip the switch to allow third-party clients to use the feature (and document it, of course :)

15 weeks 5 days ago
tweetaliano
@tweetaliano Tweetaliano

Hello there!
I'm not a developer, and I have a similar issue but for academic research purposes and about tweets in the personal archive I downloaded. I posted I request for help about it here: https://dev.twitter.com/discussions/20275

Does anyone know how to help me, if it isnt too much trouble? Thanks.

A

36 weeks 6 days ago
LincolnBerryIII
@LincolnBerryIII Lincoln Berry III

I have a solution that uses Abraham's Twitter Oauth PHP library: https://github.com/abraham/twitteroauth

It requires you to know the Twitter user's screen_name attribute as well as the id_str attribute of the tweet in question. This way, you can get an arbitrary conversation feed from any arbitrary user's tweet.

  1. <php>
  2. function get_conversation($id_str, $screen_name, $return_type = 'json', $count = 100, $result_type = 'mixed', $include_entities = true) {
  3.  
  4.      $params = array(
  5.           'q' => 'to:' . $screen_name, // no need to urlencode this!
  6.           'count' => $count,
  7.           'result_type' => $result_type,
  8.           'include_entities' => $include_entities,
  9.           'since_id' => $id_str
  10.      );
  11.  
  12.      $feed = json_decode($connection->get('search/tweets', $params), true);
  13.  
  14.      $comments = array();
  15.  
  16.      for ($index = 0; $index < count($feed['statuses']); $index++) {
  17.           if ($feed['statuses'][$index]['in_reply_to_status_id_str'] == $id_str) {
  18.                array_push($comments, $feed['statuses'][$index]);
  19.           }
  20.      }
  21.  
  22.      switch ($return_type) {
  23.      case 'json':
  24.           return json_encode($comments);
  25.           break;
  26.      default:
  27.      case 'array':
  28.           return $comments;
  29.           break;
  30.      }
  31.  
  32. }
  33. </php>
12 weeks 3 days ago
klopp_spb
@klopp_spb Vsevolod

Good idea, but does not work :( Here, for example: https://twitter.com/Julia_Voll/status/423768254608572416
(can not get comments from tweet author)

12 weeks 2 days ago
rapadder
@rapadder Stamatis Rapanakis

@LincolnBerryIII This could work to get tweets that contain the "@replyToUser" tag but not the replies that have the mention tag removed.

5 weeks 6 days ago