- The tweets you want to delete at once must be your own tweets.
- You must have an archive of your account.
- You must have an API KEY or TOKEN with "Created with Read, Write, and Direct Messages permissions".
- Free accounts are OK to delete tweets, but you will need a paid account to un-like them.
- You must be able to run python.
- Create a
.env
file with API credentials (need "Created with Read, Write, and Direct Messages" permissions):
API_KEY=YOUR_API_KEY
API_SECRET_KEY=YOUR_API_SECRET_KEY
ACCESS_TOKEN=YOUR_ACCESS_TOKEN
ACCESS_TOKEN_SECRET=YOUR_ACCESS_TOKEN_SECRET
- Specify the path to the archive file should be the /data/tweets.js file from your archieve data.
archive_file_path = 'tweets-sample.js'
- Run app.py with the path to the tweets/likes archive file:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py ~/Downloads/twitter/data/tweets.js