Translate

GET YOUR SITE ON LISTING

competitive research tools

Monday, October 5, 2020

How to Browse and Search your Liked Tweets

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 like.js


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 data folder.

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

  1. Register a new Twitter app here to get the access tokens necessary to interact with the Twitter API
  2. Create a file called .env in the root folder, whereget_likes_to_csv.py is, and fill it with your Twitter credentials
  3. Install 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 data

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. Read more

0 comments:

Post a Comment

Powered by Blogger.