In our last article we have seen how to get our followers and following list and write those names to an excel sheet. If you have not read the article please go and have a look.
In this article we are going to tweet from python using the “twitter-python”. The prerequisites and the steps to get the api keys are also in the previous article. So we shall jump right into the code in this article.
We are going to use the “PostUpdates()” api to post a data(tweet) to Twitter. We shall need the following four keys for that.
- API key
- API secret key
- Access token key
- Access token secret key
once we have that we can post our tweet to Twitter like this.
Go to your twitter account and check out your timeline for the tweet. Let me show you my tweet.
We shall see the other available methods in upcoming articles. The twitter-python module has so many methods that we can make use of. Keep doing wonderful things with python.