A few days back, I decided to nuke all my old tweets. Primarily, I realised I
was ranting about useless things. I always liked twitter to talk about
technology and meet like minded people.
Doing a clean start now!
I explored various tools to clean up twitter, came across some websites that
asked me upload my Twitter Archive. The idea of uploading my twitter archive to
unknown websites did not appeal to me. Secondly, I did not understand why they
wanted my archive.
Finally got down to writing my code and then realised why they wanted my twitter
archive. It so happens that when you ask for your timeline data, twitter date
restricts it and does not give you access to your old tweets, hence deleting
them is difficult. But from the archive, you can extract old tweets id and call
the destroy API, you can delete your old tweets.
I have written the code in a gist, attached below.