This is a simple PHP Cli application that can help you to delete your tweets, starting from the first tweet to the current one.
- Request your tweet archive from your account settings, more from here.
- Once you got the email from them and downloaded the file, you will need to extract it.
- The most important file is
tweets.csv
this file contain all your tweets.
You will need few information to be able to use this app, first you will need the following:
CONSUMER_KEY:
CONSUMER_SECRET:
ACCESS_TOKEN:
ACCESS_TOKEN_SECRET:
Which you can get from Tweeter Developer Apps website.
The app depends on one main parameter which is the File
to process mean while all the other parameters are optional.
Then run one of the following command :
docker run --rm -v $(pwd)/config/config.yml:/var/www/config/config.yml \
-v $(pwd)/tweets.csv:/var/www/tweets.csv zaherg/delete-tweets \
tweets:delete tweets.csv --all
docker run --rm -v $(pwd)/config/config.yml:/var/www/config/config.yml \
-v $(pwd)/tweets.csv:/var/www/tweets.csv zaherg/delete-tweets \
tweets:delete tweets.csv --offset=0 --limit=100
Example for skipping multiple tweets:
docker run --rm -v $(pwd)/config/config.yml:/var/www/config/config.yml \
-v $(pwd)/tweets.csv:/var/www/tweets.csv zaherg/delete-tweets \
tweets:delete tweets.csv --skip=847336825899278336 --skip=847336825899278331
So basically:
- You will need to map a yml config file (check the config directory for the info you need to supply).
- You will need to map the csv archive file that you have got from twitter.
- You can set the offset/limit and adjust them to fill your needs. Please note: that the limit cant be set more than 4k tweets, other wise it will timeout.
- You can run the next batch immediately after finishing the set, no need to wait till you can run the command again.
- remember to change the offset so you can skip the number that you have deleted.
- provide the ids for the tweets to keep, like the keybase.io verification tweet.
- you can use the
--all
parameter to delete all your tweets.
- Clone it
- run
composer install
- run
php tweet tweets:delete tweets.csv --offset=0 --limit=100