Skip to content

Instantly share code, notes, and snippets.

View seungjun-green's full-sized avatar
🎯
Focusing

Seungjun seungjun-green

🎯
Focusing
View GitHub Profile
@sparack
sparack / tweepy_migration_guide.md
Created April 14, 2022 00:31
A guide to migrating your code in Python that uses Tweepy from the Twitter API v1.1 to the Twitter API v2

Guide to migrating your code from Twitter API v1.1 to v2 with Tweepy in Python

Tweepy is a popular library that allows developers to interact with the Twitter API in Python. Since the launch of the new Twitter API v2, Tweepy has been updated to support the new API. Many students and developers continue to use the old Twitter API v1.1 in Tweepy, because they are unware of the new API v2 or because they do not know how to migrate their code to use v2.

In this guide, I will show you how you can migrate your Tweepy code in Python that uses the old Twitter API v1.1 to use the new Twitter API v2.

In order to use the Twitter API, you first need to sign up for access. Once you have access, you need to get your keys and tokens from the developer portal to connect to the Twitter API. To learn how to get your keys and tokens based on your access levels, check out t