Skip to content
Dale Wahl edited this page Oct 4, 2022 · 4 revisions

Migration from Twitter API v1 to v2

Twitter is slowly deprecating API v1. Starting October 31, 2022, the statuses/sample endpoint will be retired which means TCAT's onepercent tracking will no longer work.

Twitter as of April 29, 2022 stopped approving new client applications to the API v1 statuses/sample and the statuses/filter endpoints which will make it difficult to obtain the API keys needed to use TCAT. The statuses/filter endpoint is used by TCAT for both the follow and track features.

At an undecided point in the future, Twitter will fully retire the statuses/filter endpoint. It is therefore necessary to migrate to Twitter API v2.

What can you do currently?

The Digital Methods Initiative is actively developing the 4CAT: Capture and Analysis Toolkit which supports Twitter's API v2 for the Essential, Elevated, and Academic Research access levels. At this time 4CAT allows use of the /search/ endpoint and full use of Twitter's query tools which, combined with the new Academic Research access level allowing search of full history of tweets, is quite powerful. 4CAT also offers a variety of analysis methods including many of TCAT's methods. Currently 4CAT does not offer continuous tracking of queries like TCAT.

Migrating data from TCAT to 4CAT

It may be useful to export your existing TCAT data and import it into 4CAT either to use additional analysis methods or to keep all your data in one system.

4CAT has two ways to import TCAT data:

  1. TCAT frontend 4CAT can interface directly with the TCAT frontend and allowing 4CAT users to access TCAT's /analysis/mod.export_tweets.php endpoint to request TCAT tweets. This simply requires a 4CAT admin to add "dmi-tcat": {"instances": ["http://username:[email protected]"]} to their datasources in the 4CAT settings tab. (They may also have to upgrade 4CAT to the latest version.) So long as the username and password are valid, the you should be able to use all the same parameters as on the TCAT analysis page.

4CAT interface: image

  1. TCAT database 4CAT can also interface directly with the TCAT MySQL database. This does require additional setup as the MySQL database does not allow remote connections. You can find additional instructions here.

Streaming endpoints

The use case of capturing tweets from a keyword or one percent sample stream, which TCAT is built around, is currently not supported by 4CAT. It will be in the future; work on this is on-going. We expect/hope to make this available in early 2023.