API (Application Programming Interface) and it allows developers to communicate with various web services. Since Python is, by default, installed on the Raspberry Pi, we will use a Python script to communicate with the Twitter API over the Web. For this, we will use an open source library called Tweepy. It works with Python versions as old as 2.6 and is still under active development. So bugs are likely to be fewer and, if any are found, they are likely to be fixed quickly.
Note
The GitHub repository for Tweepy can be found at the following link, so that new issues can be submitted and the code can be understood much more clearly:
We will now proceed to install it and learn how to use it to do things such as sending tweets.
This library can be installed using pip
, with the following command:
sudo pip install python-twitter
We can also install bleeding-edge versions of the library by cloning it from GitHub. Run the following...