⚠️ Doesn't work anymore. Needs to be ported to /v2/ but even then basic API tier doesn't have access to follower list and the endpoints we use here. Thanks El*n.
This repository periodically runs a GitHub Action to backup various parts of my Twitter account:
- follower list (works up to 75k followers due to rate limits)
- following list
- blocked accounts list and
- muted accounts list
(Twitter does not offer an API for exporting muted words.)
You can fork this repository and make it work for your account.
This code currently uses both Twitter v1 and v2 APIs. v2 API is currently behind a manual approval process.
-
Fork this repository.
-
git rm *.txt
(delete my backups),git commit
,git push
-
Create a Twitter app from Developer Portal.
-
Go to GitHub
Repository Settings
→Secrets
and add secrets from the Twitter app you created in previous step:- TWITTER_CONSUMER_KEY
- TWITTER_CONSUMER_SECRET
- TWITTER_ACCESS_TOKEN
- TWITTER_TOKEN_SECRET
-
(Optional) Modify the cron schedule (in UTC) as you see fit in .github/workflows/update.yml. Commit and push.
-
GitHub will trigger the scheduled action and backup the lists to
.txt
files as commits to your forked repository.