Daniels Blog
20Nov/110

Tweet Neglector. A small PHP script to delete old Tweets from Twitter

Tweet Neglector automates the process of deleting old tweets from your Twitter account. Basicly it provides an "expire" functionality for your tweets. It is useful for people who want to use Twitter but don't want a history of their tweets to stay online for decades.

HISTORY:
Nov 20 2011 | Version 0.1
Initial release. Deletes Tweets

Dez 28 2011 | Version 0.2
Small bug fixes. Now deletes Retweets as well.

Nov 05 2012 | Version 0.3
Twitter changed it's API and TweetNeglector was affected by it.
With a quick and dirty hack I made it work again.
Much of the code is obsolete now and TN should be rewritten,
but it's working fine.

Jul 26 2013 | Version 0.4
Twitter changed it's API once again. This is a complete rewrite of
Tweet Neglector. It can now remove up to 3200 old Tweets and Retweets per run.

Aug 1 2013 | Version 0.5
Small cosmetic fix.

Tweet Neglector uses the Twitter API to delete all your tweets that were posted before a given number of days from now. This way you could configure the script to delete all tweets that are older than a week or a month for example. The script should be automatically run from a cronjob or another automation mechanism on a regular base.

This script can't protect you from external Tweet archives like the Library of Congress. Also it is unknown if deleted Tweets are still archived by Twitter (I bet they are). It can clean up your timeline though, so people can't see your old tweets on Twitter anymore. So (as always) think before tweeting.

Tweet Neglector uses PHP as scripting language and bundles the Twitter-API-PHP library by James Mallison for API-Access.

Installation

- Unzip the archive into a directory of your choice.

- Register your Twitter API-Keys at https://dev.twitter.com/apps

- Edit the configuration of the script to suit your needs in tweetneglector.php

- Run the script manually from browser, console or automatically by cronjob
/usr/bin/php /var/www/tweetneglector/tweetneglector.php

Download Tweet Neglector 0.5 here