Skip to content

A sample of how to call the Watson Personality Insights API with twitter data in java.

Notifications You must be signed in to change notification settings

PhilippeComte/personality-insights-twitter-java

Repository files navigation

IBM Watson Personality Insights Twitter Java Sample

This sample shows how to get Twitter data using the Twitter REST API (via the Twitter4j 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 sample.

To configure the sample, copy twittersample.properties.example to twittersample.properties and fill in your Twitter and Personality Insights Credentials. Instructions are provided in the example properties file.

Building the sample

To build the code, use the provided gradle build file and wrapper configuration.

On Mac or Linux:

./gradlew build

On Windows:

./gradlew.bat build

Running the sample

To run the sample, run the TwitterAnalyzer java class and pass in a twitter user's handle (with an @ sign) or their numerical id.

Example:

java com.ibm.watson.personalityinsights.sample.twitter.TwitterAnalyzer @jschoudt

About

A sample of how to call the Watson Personality Insights API with twitter data in java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages