Explore how to use Python's Tweepy library to authenticate with Twitter's API, retrieve tweets from your timeline, and update your status. This lesson guides you through obtaining the necessary API keys from Twitter's developer portal and writing simple code to interact with Twitter programmatically.
We'll cover the following...
Some companies will actually release language specific API wrappers for
their API, while others will just publish an API and an independent
group will wrap their API in their programming language of choice. In
Twitter’s case, they just published an API and several different
individuals have wrapped it with Python. One of the most popular Python
wrappers for the Twitter API is called tweepy. Let’s install it and
give tweepy a try!
pip3 install tweepy
Now that we have it installed, we will need to register with Twitter
to get an authentication key and secret that we can use with their
OAuth implementation. Twitter will also provide we with a unique access
token and secret for accessing their API. Once we have those in hand we
can write some code to extract the tweets from ...