Instructions for the Google+ Command-Line Sample
Browse Online
Register Your Application
- Visit the Google
apis console
- If this is your first time, click "Create project..."
- Activate the Google+ API and agree to the terms of service
- Click on "API Access"
- Enter the "API Key" shown under "Simple API Access" into the API_KEY constant.
Checkout Instructions
Prerequisites: install Java 6, Mercurial and Maven. You may need to
set your
JAVA_HOME
.
cd [someDirectory]
hg clone https://code.google.com/p/google-http-java-client.samples/ google-http-java-client-samples
cd google-http-java-client-samples/googleplus-simple-cmdline-sample
mvn compile
mvn -q exec:java
Setup Project in Eclipse 3.5/3.6
Prerequisites: install Eclipse,
the Mercurial plugin, and the
Maven
plugin.
- Setup Eclipse Preferences
- Window > Preferences... (or on Mac, Eclipse >
Preferences...)
- Select Maven
- check on "Download Artifact Sources"
- check on "Download Artifact JavaDoc"
- Import
googleplus-simple-cmdline-sample
project
- File > Import...
- Select "General > Existing Project into Workspace" and click
"Next"
- Click "Browse" next to "Select root directory", find
[someDirectory]/google-http-java-client-samples/googleplus-simple-cmdline-sample
and click "Next"
- Click "Finish"
- Run
- Right-click on project googleplus-simple-cmdline-sample
- Run As > Java Application
- If asked, type "GooglePlusSample" and click OK
- To enabled logging, uncomment the logging level lines in
logging.properties