Have you ever tried to find a tweet you liked some time ago? Me too, and it’s almost impossible. Scrolling down in the ‘Likes’ tab of my profile while doing CMD-F is a pain and it doesn’t even work sometimes.
I came up with a way of saving all my past and future Twitter likes. It lets me browse, filter them and search for tweets by text or user. And it’s free.
I thought it could be helpful for others, so here it goes
Saving all your past Twitter likes
If you’re only interested in keeping an archive of your future Twitter likes, you can skip this part and jump to the last section.
Step 1: Downloading your Twitter archive
Go to https://twitter.com/settings/your_twitter_data, enter your password and then click on ‘Download Archive’. It will take some minutes and you’ll get then an email when they’re ready.
Download them and you’ll get a .zip with a bunch of .js files. The only one you’ll need is
Step 2: parsing that file and getting the full info for each tweet
To do so, I made a small python project. You can clone it from https://github.com/xoelop/get-twitter-likes.
Then, go to where you’ve cloned the repo in your computer and copy your
like.js file into the
The main script in the project is
get_likes_to_csv.py . Running it parses
like.js, connects to the Twitter API to download the full info for each tweet and then saves it to a CSV file.
To be able to use it, you’ll need to
- Register a new Twitter app here to get the access tokens necessary to interact with the Twitter API
- Create a file called
.envin the root folder, where
get_likes_to_csv.pyis, and fill it with your Twitter credentials
pipenv if you don’t have it, doing
pip install pipenv
4. And finally, run
pipenv run python get_likes_to_csv.py
I had about 6k liked tweets and it took about 1 minute. Then, you’ll have a CSV file with all the details for all your liked tweets in
Finally: having all your liked tweets saved in the cloud
You could use Airtable (ref link) or any other service you want. I loove Airtable, it lets you create multiple views for the same table, filter, group values in a much nicer way than Google Sheets.
But the row limit per base in the free plan is only 1200, while it’s 5 millions in Google Sheets. So I used Google Sheets, it’s good enough for now.
To do it, go to sheets.new to create a new spreadsheet on Google Sheets. Then, click on
File > Import > Upload and drag there the CSV you’ve just created
Saving all your new Twitter likes
To do this, I created an Integromat scenario that fetches my most recent likes and adds them to this spreadsheet.
For those that don’t know it, Integromat is a product that lets you connect hundreds of apps together without coding. It’s like Zapier on steroids. Their free tier includes 1000 free operations per month, which is a lot and probably enough to run this.
If you don’t have an account, sign up here first. Note: it’s a referral link, but it’s free and, if you upgraded to a paid account, it wouldn’t cost you more :)
This scenario has just 3 modules: the first one to get the IDs of the last liked tweets, the middle one to get detailed information for each tweet, and the last one to create new rows in Google Sheets
If you don’t wanna set it all up by yourself, you can just clone this scenario. Integromat doesn’t let users share scenarios with a link yet, but you can import and export scenarios.
So I exported mine and uploaded to this Github repo.
To clone it, download this json. Then, go to integromat.com, click on ‘Create new scenario’. Don’t select any module, and in the next screen click on the
... button, and then on Import Blueprint. Select the JSON file you’ve just downloaded, and the scenario will be almost ready
The last thing you’ll have to do it adding your Twitter and Google accounts so that Integromat can connect to them. To do so, click on each one of the modules, click on
Add to add the connections if you haven’t before.
And finally, if you want your scenario to run periodically, make sure to set up and turn on scheduling, on the bottom left corner
Let me know if something isn’t clear or you need help setting it up. And if you found this interesting, follow me on Twitter!