The ability to easily download our entire tweet archive from Twitter also gives us the ability to identify and erase tweets from our past en masse. If you're the type of person who rips up your old poems this script is for you.
There is no undo for this script. Weigh your decision carefully before erasing your tweets. You will, of course, still have your local archive after deleting your tweets on Twitter.
- Finn Smith
- Based on Shame Eraser by Benjamin Jackson
- ruby
- The bundler gem
First, you'll have to set up a Twitter app on the developer portal and generate an OAuth key.
-
Visit the Twitter Developer Apps page and create a new app. Fill out only the required fields.
-
Go to the Settings tab for your app, scroll down, and change Application Type to
Read and Write, then click Update this Twitter application's settings. -
Go to the Details tab, scroll down, and click Create my access token. (Or Recreate my access token if you already created one.) When you refresh, you should see Access Level: Read and Write after your access token and secret.
- Clone this repo.
cdinto the repo directory.- Install the bundled gems locally:
bundle install --path vendor
- Configure the script with your Twitter app authentication information. Edit
lib/config.rband add your consumer key, consumer secret, access token, and access token secret from dev.twitter.com
- Download your tweet archive from Twitter and unzip it. Note the path to the newly unzipped directory.
- Using bundler, run the
erase_tweetsscript from this repo, pointing it to the path of your unzipped tweet archive directory:
bundle exec bin/erase_tweets /path/to/tweet/archive/dir