[Update] This article was only a proof of concept oriented towards developers. Please don't ask for help in order to use this script because it may not work at all.
When my cofounder at Bringr told me that Topsy new search engine was able to look at every tweet published since 2006 I immediately tried to search my username to see my first tweets.
What a horrible sight, my first tweets from 2007 were disastrous, both in grammar and in content. In France, we like to think that we believe in what I would translate as the right to be forgotten (Le droit à l'oubli), in short it's the right be protected from search engine indexing things we posted years ago. Because sometimes we publish things online that we'll regret some years later (just look at all those kids that share too much of their personal lives on Twitter or Facebook).
So while I was playing with Topsy, I looked at the network exchange and discovered Topsy own search api.
|Topsy private api|
What's awesome about this endpoint is that perpage parameter allows to request more than 5000 tweets with just one call! I quickly wrote a (Java)Script (got it?) to download all those tweets and remove each one of them thanks to Twitter API own API. And it worked.
As usual the script is available on Github. Just edit the config.js file and run it. You'll need to create your own Twitter application and copy/paste your consumer_key/secret and access_token/secret.
Since Topsy does not require a login I wonder if they use the same apikey for everyone, don't hesitate to post your own observation on this matter!
git clone firstname.lastname@example.org:FGRibreau/twitterremover.git
Oh, one last thing, because it's a private API you have no guarantee that this endpoint will work forever so don't build anything serious on it :).
Thanks for reading that far! If you liked it you may like what I share on @fgribreau
NB: Another way to achieve the same result would be to request a Twitter archive and then write a script to read it... but that would take all the fun away!