Python script to delete tweets within a date range.
- tweepy
- json
- glob
- dateutil
- Download your Twitter archive
- Install dependencies (usually only tweepy) e.g.
pip install tweepy - Make a developer account at dev.twitter.com
- Create a new twitter app
- Set app permissions to read and write
- Generate access token for your account
- Set API and access key-secret pairs in
delete_tweets.pyi.e.api_key,api_secret,access_tokenandaccess_token_secret - Set
file_dirto point to directory containing JSON formatted tweets - Set date range by adjusting
date_minanddate_max - Run using
python delete_tweets.py