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.
- The bundler gem
Set Up A Twitter App
First, you'll have to set up a Twitter app on the developer portal and generate an OAuth key.
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.
Set up the script
- 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
Delete Your Old Tweets
- 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