Now that we have the basic setup in our file, it's time to start retrieving some data from Twitter.
Before we can interact with the Twitter API, we need to authenticate with the Twitter API. To do this, make sure you have your Twitter credentials handy:
Consumer Key (API Key)
and Consumer Secret (API Secret)
Access Token
and Access Token Secret
Once you have the credentials, add them to the correct variables in the following lines of code:
twitter_consumer_key = ''
twitter_consumer_secret = ''
twitter_access_token = ''
twitter_access_secret = ''
These credentials will allow us to call the Twitter API using the Twitter package we imported earlier.
Add your Twitter credentials to CelebrityMatch.py. Make sure you add them to the correct variables.
twitter_consumer_key = ''
twitter_consumer_secret = ''
twitter_access_token = ''
twitter_access_secret = ''
Note: Remember, without Twitter credentials, your Watson-powered application will not work. If you don't have a Twitter account, first create one and then retrieve your credentials.
Click Run to save your code, then click Next to continue.