Script for downloading Twitter likes with viewer app. Includes optional script to download images locally.
- Go to Developer portal and set up account if needed. Create a project etc. Generate access tokens. Copy all received tokens.
mv .env.template .env
- You can find your
TWITTER_USER_ID
for example using TweeterID service. API Key
isTWITTER_CONSUMER_KEY
.API Key Secret
isTWITTER_CONSUMER_SECRET
.Bearer Token
isTWITTER_BEARER_TOKEN
.
git clone [email protected]:tchayen/backup-likes.git
cd backup-likes
yarn
node src/likes.mjs # Download liked tweets.
node src/downloadImages.mjs # Download images locally.
node src/downloadVideos.mjs # Download videos and GIFs locally.
cd viewer
yarn
yarn dev
Go to localhost:3000.
- Detect if user did not download images/videos and use twitter ones (won't be possible with videos because it requires at least one API call that easily hits rate limit).
- Find a way to seemlessly fetch new liked tweets without redownloading the whole archive (might require some normalization of tweets, maybe in the end storing them in a local SQLite database).