Investigating likes and retweets on Twitter with Twarc

Changes to Twitter’s API now allow researchers to look at the full history of likes on tweets, and likes by specific users. We’ve added support for this to the twarc toolkit to make this newly expanded functionality accessible to more people.

As a quick example, you can retrieve the profiles of all the Twitter users that have liked Scott Morrison’s tweet congratulating Tess Coady on her bronze medal in the winter Olympics by running the following command:

twarc2 liking-users 1490184234556100610 bronze_medal_likes.json

The 1490184234556100610 number in the above command is the ID of the tweet, in this case taken from the URL of that tweet.

We can also retrieve the tweets that the Australian Prime Minister has liked:

twarc2 liked-tweets 34116377 ScottMorrisonMP_likes.json

The 34116377 is the user ID of Scott Morrison’s Twitter account.

This new functionality in the Twitter API allows many new interesting lines of research – we hope you find this useful!

Share content via social media