- Apply for a Twitter Developer Account.
- Upon verification create an application.
- Install tweepy.
- Authorize via running the following code (using your own consumer key, consumer secret, access token and access secret) [AUTHORIZATION CODE]
The following code enables us to randomly generate a username. If the username already exists, the ID of the user is printed and if it does not exist, it is indicated that the username is free for usage. [RANDOMLY GENERATE USERNAME]
In order to pull ten most recent tweets from your Twitter feed the following code can be followed. [OWN TIMELINE CODE]
In order to pull data from a twitter handle the following code can be followed. [GET DATA FROM HANDLE]
Here, 150 of the most recent tweets of the CEO of Twitter (Twitter Handle Name: jack) have been extracted. Date and time, tweet id and tweet have been printed.
In order to pull data from a twitter handle the following code can be followed. [GET DATA FROM PHRASES]
Here, 150 of the most recent tweets of the phrase '2020 US Election' have been extracted. Date and time, tweet id and tweet have been printed.