Using the search API (search/tweets) I would like to define if a tweet is:
- a retweet
- a reply to an user (similar to an @mention…I assume…but different because status->text starts with @) Am I right??
- a reply to a tweet
- a regular tweet
right now I’m doing something like that:
- check with a regexp /^RT @(.*):/siU the first part of status->text ===> retweet
- check if status->in_reply_to_user_id_str is not empty & if status->in_reply_to_status_id_str is empty ===> a reply to an user
- check if status->in_reply_to_user_id_str is not empty & if status->in_reply_to_status_id_str is not empty ===> a reply to a tweet
- otherwise is a regular tweet
It seems to work…but - actually - I don’t know if this “logic” is good, buggy or totally wrong
So, if anyone could suggest a better solution…I would appreciate it!
P.S. could it be possible, in the future, to have included in the tweets object response this kind of information? => something like: ‘tweet_type’: text