Android application implementing the Oauth 1.0 flow using the Google APIs Client Library for Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


##Software requirements

##Project setup

m2e-android plugin

This project is built using the m2e-android plugin to handle its external dependencies.

When using Eclipse ADT, it assumes that the following components are installed :

Eclipse MarketPlace

If you don't have the Eclipse Market Client installed, you can install it by clicking on

Help → Install new Software → Switch to the Juno Repository → General Purpose Tools → Marketplace Client

Once you have the Eclipse Market Client installed, you can proceed to install the m2e-android plugin

Help -> Eclipse Marketplace... and search for "android m2e".

More instructions can be found on the m2e-android plugin site.


Clone the maven-android-sdk-deployer and execute mvn install. This will install the required projects into your local maven repository.

Environment setup

Make sure you have your ANDROID_HOME variable pointing to your SDK

Clone and import the project

Clone the project on your filesystem

git clone
Cloning into AndroidTwitterGoogleApiJavaClient...
remote: Reusing existing pack: 145, done.
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 156 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (156/156), 529.74 KiB | 483 KiB/s, done.
Resolving deltas: 100% (33/33), done.

Import the project in Eclipse ADT.

When importing the project, select Existing Maven Projects.

Navigate to the place where you cloned the repository (ex: /Users/ddewaele/Projects/AndroidTwitterGoogleApiJavaClient) and click Finish.

After that, Eclipse ADT and the Maven M2E plugin should import your project and setup all the dependencies.

Twitter OAuth application and keys

As this application allows you to interact with Twitter, you need to go to to the Twitter Developer page to register a new application.

Here are a couple of steps you need to follow

  • Register a new application in the Twitter dev console

  • Verify that the application was created succesfully.

  • Set the correct permissions

  • Copy the key and secret from the app.

Replace the placeholders below with the actual KEY and SECRET

public static final String API_KEY = "PUT YOUR TWITTER API KEY HERE";
public static final String API_SECRET= "PUT YOUR TWITTER API SECRET HERE";

Launch the application and you should see the following screens.

Twitter login Twitter authorization Twitter tweets