Instructions for the Daily Motion OAuth2 Command-Line Sample

Browse Online

Checkout Instructions

Prerequisites: install Java 6, Mercurial 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]
hg clone https://code.google.com/p/google-oauth-java-client.samples/ google-oauth-java-client-samples
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 3.5/3.6

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