This sample shows how to get Twitter data using the Twitter REST API (via the python-tweepy client library) and submit it to the Personality Insights Service.
For non-twitter samples and more details on how to setup your Personality Insights service in bluemix see the official Watson Developer Cloud samples.
This sample was developed on Python 2.7.2 with the python-tweepy
and requests
libraries, installed via pip.
To configure the sample, edit twitteranalyzer.py
to fill in your Twitter and Personality Insights Credentials. Instructions are provided in the comments
in same file.
Provide a twitter handle/screen name WITHOUT the leading @ sign. Example:
python twitteranalyzer.py jschoudt