There may come a time in your Twitter existence when you realize that you’ve said a lot of dumb stuff in your past. Facebook is especially good at reminding you of how immature and annoying you were 10 years ago. So while the reasons may differ from person to person, it’s important to know how to flush your Twitter account.
Unfortunately, Twitter doesn’t make this easy. And the 3rd party online tools have some severe limitations: 1) the Twitter API only exposes a limited number (few thousand) of your most recent tweets, and 2) you’re giving a 3rd party tool all permissions to your account.
Well, if you have a few minutes and have Ruby installed, you can do this whole process by yourself.
Head over to: https://developer.twitter.com/en/apps If you already have an existing Oauth app, you’re good to go. If you need to create one, you’ll need to sign up for a Twitter developer account.
Once you create (or have) an Oauth app handy, view the app details and click on “Keys and Tokens”. You’ll need 4 pieces of data:
You may need to generate the Access Token. You can do this by clicking “Create” under “Access token & access token secret”.
Hang onto this info – you’ll need it in the Ruby script later.
Because Twitter doesn’t expose all of your tweets in the API, you’ll need to get all of the IDs yourself. Luckily, Twitter allows you to download all of your Twitter data.
Give it a few minutes and you’ll get a link to download a ZIP file. Inside this, you’ll want to grab two specific files:
tweets.js(this will give you all your tweet ID’s), and
like.js(this will give you the tweet ID’s of your likes)
Do two things to these files:
window.YTD.like.part0 =from the first line. Now it should only be
Ok. You ready? No turning back, my friend.
Create a file in the same directory as your two JSON files. Call it …
To run this, simply open a terminal window and run
exception.message. (I have about 40 @-replies directed at suspended accounts. Twitter won’t show them, but they also won’t let me delete them)
Done with your tweets? Let’s get rid of those likes too. Change your
twitter.rb file to this:
Same running process:
The hardest part of this is creating the Oauth app. I had some old apps from back in the day that I was able to repurpose. Just remember: you can’t put these tweets back. So give it a second thought before you run these scripts.
Writer. Musician. Adventurer. Nerd.
Husband. Dad to three. From: all over the place.
Exvangelical, but still amazed. Enneagram 7.