March 2019
Beginner
490 pages
12h 40m
English
To be able to use the Twitter API, it is necessary to create an object based on the twitter.Twitter class, which will result in an object capable of interacting with the Twitter API that must be defined using the auth parameter:
>>> twitter.Twitter (auth = <object twitter.oauth.OAuth>)
The argument for the auth parameter must be an instantiated object of the twitter.oauth.OAuth class for which the Twitter access credentials must be entered:
>>> twitter.oauth.OAuth(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_TOKEN,ACCESS_TOKEN_SECRET)
For example, this function allows you to read the credentials from a file whose path will be entered as a parameter and to return a twitter.Twitter object with an active connection to ...
Read now
Unlock full access