Code Editor
Learn
A Watson-Powered Application

A Working App: Celebrity Match

Let's demo a working application that showcases one of the 19 APIs available within the Watson Developer Cloud: the Personality Insights (PI) API.

The name of this application is Celebrity Match.

The application does the following:

  1. Accepts two Twitter usernames as variables
  2. Retrieves the last 200 Tweets from each Twitter username
  3. Sends the text of the 200 Tweets to the Personality Insights (PI) API (covered in more detail later in this course) to gain insights on the two users
  4. Compares the users to one another
  5. Displays the results of the comparison

The final results displayed will be the top 5 traits shared between the two Twitter users (for example: you and a celebrity of your choice).

The results are displayed in the following format:

Matched Personality Trait -> Probability of your profile exhibiting given trait -> Probability of Celebrity's profile exhibiting given trait.

Note: To successfully run this demo, a Twitter account and Twitter API credentials are required. This exercise describes how to obtain API credentials.

Instructions

Enter a Twitter username on line 71. Be sure to include the @ symbol and ensure the name is encapsulated by " ".

Note: The Twitter username must correspond to a public Twitter account.

On lines 15 through 17, add your Twitter API credentials to the correct variables. Again, use this exercise to help you.

Click Run to run the program and view the results.

Note: This demo will not work without Twitter API credentials.

Report a Bug
If you see a bug or any other issue with this page, please report it here.