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

hat dir dieser Artikel gefallen?

Dann abonniere doch diesen Blog per RSS Feed!

Kommentare (0) Trackbacks (0)
  1. Hi Martin,

    you probably don’t have PHP5 with CURL support installed on your webhost.
    tmhOAuth needs:

    The library has been tested with PHP 5.3+ and relies on CURL and hash_hmac. The vast majority of hosting providers include these libraries and run with PHP 5.1+.

    The code makes use of hash_hmac, which was introduced in PHP 5.1.2. If you version of PHP is lower than this you should ask your hosting provider for an update.

    https://github.com/themattharris/tmhOAuth

  2. Hi, always get a error

    ********************

    DELETING TWEETS

    ********************

    Delete Thu, 01 Jan 1970 00:59:59 +0100 | ID: 87076355619041280
    Ich suche dringend Immobilien rund um den Woerthersee, freue ich mich auf Ihre Kontaktaufnahme

    Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‚}‘ in /homepages/21/d40854583/htdocs/biz/tweetneglector/tmhOAuth.php on line 15

    is there a fix for that!

    This program seem to be outstanding!

    Martin

  3. ups… Namen nicht eingetragen, ich bins, Andreas! 😉

  4. Funzt das denn jetzt zuverlĂ€ssig? 🙂
    BrĂ€uchte das auch mal fĂŒr Facebook! 😉


Leave a comment

Noch keine Trackbacks.