Instructions for the Daily Motion OAuth2 Command-Line Sample

Browse Online

Checkout Instructions

Prerequisites: install Java 6, git, and Maven. You may need to set your JAVA_HOME.

Important: after checking out the project, and before compiling and running it, you should edit OAuth2ClientCredentials.java to enter the required credentials information. Otherwise, you will get a 400 INVALID_CLIENT error in your browser. To begin, go to the Dailymotion Developer Profile, click "Create New API Key" and specify "http://127.0.0.1:8080/Callback" as the "Callback URL".

cd [someDirectory]
git clone https://github.com/googleapis/google-oauth-java-client.git google-oauth-java-client
cd google-oauth-java-client/samples/dailymotion-cmdline-sample
[editor] src/main/java/com/google/api/services/samples/dailymotion/cmdline/OAuth2ClientCredentials.java
mvn compile
mvn -q exec:java

Setup Project in Eclipse

Prerequisites: install Eclipse, the Mercurial plugin, and the Maven plugin.