{"id":953,"date":"2011-11-20T18:35:13","date_gmt":"2011-11-20T17:35:13","guid":{"rendered":"http:\/\/www.daniel-ritter.de\/blog\/?p=953"},"modified":"2024-05-13T01:13:44","modified_gmt":"2024-05-12T23:13:44","slug":"tweet-neglector-a-small-php-script-to-delete-old-tweets-from-twitter","status":"publish","type":"post","link":"https:\/\/www.daniel-ritter.de\/blog\/tweet-neglector-a-small-php-script-to-delete-old-tweets-from-twitter\/","title":{"rendered":"Tweet Neglector. A small PHP script to delete old Tweets from Twitter"},"content":{"rendered":"<p>Tweet Neglector automates the process of deleting old tweets from your Twitter account. Basicly it provides an &#8222;expire&#8220; functionality for your tweets. It is useful for people who want to use Twitter but don&#8217;t want a history of their tweets to stay online for decades.<\/p>\n<pre>\r\nHISTORY:\r\nNov 20 2011 | Version 0.1\r\nInitial release. Deletes Tweets\r\n\r\nDez 28 2011 | Version 0.2\r\nSmall bug fixes. Now deletes Retweets as well.\r\n\r\nNov 05 2012 | Version 0.3\r\nTwitter changed it's API and TweetNeglector was affected by it.\r\nWith a quick and dirty hack I made it work again.\r\nMuch of the code is obsolete now and TN should be rewritten,\r\nbut it's working fine.\r\n\r\nJul 26 2013 | Version 0.4\r\nTwitter changed it's API once again. This is a complete rewrite of\r\nTweet Neglector. It can now remove up to 3200 old Tweets and Retweets per run.\r\n\r\nAug 1 2013 | Version 0.5\r\nSmall cosmetic fix.\r\n<\/pre>\n<p>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.<\/p>\n<p>This script can&#8217;t protect you from external Tweet archives like the <a href=\"http:\/\/blogs.loc.gov\/loc\/2013\/01\/update-on-the-twitter-archive-at-the-library-of-congress\/\">Library of Congress<\/a>.  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&#8217;t see your old tweets on Twitter anymore. So (as always) think before tweeting.<\/p>\n<p>Tweet Neglector uses PHP as scripting language and bundles the <A HREF=\"http:\/\/github.com\/j7mbo\/twitter-api-php\"> Twitter-API-PHP library by James Mallison<\/A> for API-Access. <\/p>\n<p><b>Installation<\/b><\/p>\n<pre>\r\n- Unzip the archive into a directory of your choice.\r\n\r\n- Register your Twitter API-Keys at https:\/\/dev.twitter.com\/apps\r\n\r\n- Edit the configuration of the script to suit your needs in tweetneglector.php\r\n\r\n- Run the script manually from browser, console or automatically by cronjob\r\n\/usr\/bin\/php \/var\/www\/tweetneglector\/tweetneglector.php\r\n\r\n<\/pre>\n<p>Download Tweet Neglector 0.5 <A HREF=\"https:\/\/www.daniel-ritter.de\/blog\/extras\/tweet_neglector_05.zip\">here<\/A><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tweet Neglector automates the process of deleting old tweets from your Twitter account. Basicly it provides an &#8222;expire&#8220; functionality for your tweets. It is useful for people who want to use Twitter but don&#8217;t want a history of their tweets to stay online for decades. HISTORY: Nov 20 2011 | Version 0.1 Initial release. Deletes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,227],"tags":[140,137,139,141,138],"class_list":["post-953","post","type-post","status-publish","format-standard","hentry","category-diesunddas","category-linux","tag-delete","tag-expire","tag-php","tag-tweets","tag-twitter"],"_links":{"self":[{"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/posts\/953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/comments?post=953"}],"version-history":[{"count":21,"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/posts\/953\/revisions"}],"predecessor-version":[{"id":1917,"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/posts\/953\/revisions\/1917"}],"wp:attachment":[{"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/media?parent=953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/categories?post=953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.daniel-ritter.de\/blog\/wp-json\/wp\/v2\/tags?post=953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}