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.py
i.e.api_key
,api_secret
,access_token
andaccess_token_secret
- Set
file_dir
to point to directory containing JSON formatted tweets - Set date range by adjusting
date_min
anddate_max
- Run using
python delete_tweets.py