Hello fellow developers, :slightly_smiling_face:

I have created a twitter bot for RTing tweets having hashtags #DataScience or #DataVisualization

The ‘search/tweets’ API endpoint finds all the tweets having the above-mentioned hashtags, including retweeted ones.

Since the retweeted tweet has a different id_str property the endpoint ‘statuses/retweet/:id’ retweets it too!

This causes the same tweet to be viewed twice or sometimes more times on my timeline, as seen in the attached image.

An example would be these two tweets -
Original one - wpippich/status/1280812876371034112
The retweeted one (duplicate) - BotHumDig/status/1280812903277395973

You can observe several instances of duplicate tweets on my timeline - @datasciencebot_
To a novice user, they seem the same.

But Upon close observation, I noticed that the retweeted one has text property beginning with "RT @username "

Is there any possible solution to this apart from ignoring tweets having text starting with "RT @username " in my code.

Since it is the same tweet shouldn’t the API ignore the second call as duplicate?

Please let me know.

Thanks and regards,
The DataScience Bot. :slightly_smiling_face: :robot:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.