0

Possible Duplicate:
Replies to a particular tweet, Twitter API

Is there a good way to detect whether a tweet was a reply to another tweet.

Right now I'm thinking of checking the first character of the tweet - if it's an @, then it's a reply. But this would also select tweets like @veosotano did an awesome commit today.

So my question is, whether there are any better ways to detect replies?

Community
  • 1
  • 1

1 Answers1

0

Every tweet has several attribues starting in "in_reply_to"... I'd guess that if these exist, then the tweet is a reply:

https://dev.twitter.com/docs/twitter-ids-json-and-snowflake

They will also help you determine to whom this is a reply, and to what tweet.

WhyNotHugo
  • 9,423
  • 6
  • 62
  • 70
  • The example that I gave will also have these fields filled. –  Apr 04 '12 at 20:32
  • Right. Sooo... what's your question? That seems to answer what you initially asked. – WhyNotHugo Apr 05 '12 at 01:01
  • Doesn't really answer it at all and the example is misleading as it talks about the changes to tweets IDs , nothing to do with figuring out which one is a Reply. The example just refers to a tweet status object which can be in_reply_to or not. – Chamilyan Apr 05 '12 at 09:34
  • 2
    WHAT? There's a field called "in_reply_to_user_id". If it's present, the tweet is a reply, if it's empty, then it's not. What's so complicated about that? Just look at the exampe, circa line 39. – WhyNotHugo Apr 05 '12 at 19:17
  • the link has nothing to do with what your talking about. You would be better off linking to this, https://dev.twitter.com/console – Chamilyan Apr 06 '12 at 07:16
  • The link I provided shows a relevant part of the API. The link you provide, lets you *test* that same API. Any programmer would read the API before trying someting out. I can, based on my link, create an application that can detect if a tweet is or isn't a reply to another. If you don't understand it; that's another matter. – WhyNotHugo Apr 06 '12 at 23:54
  • agh I'll say it again. I understand it perfectly and that's the problem. You linked to something completely irrelevant and misleading. The sample just happened to have one field with `in_reply_to` but the article has nothing to do with it. – Chamilyan Apr 08 '12 at 10:09
  • The article show an example of a tweet. The example is enough really. – WhyNotHugo Apr 08 '12 at 13:28