Posts Tagged ‘signpost’

Implementing the OAuth flow in Android

November 10th, 2010 35 comments
In this post, I’ll be showing you how to use the OAuth signpost library in an Android application. We’ll create a simple application that fetches your Google Contacts using the Google Contacts API, and display the contact names on the screen.
We’ll focus on using the Signpost API in an Android runtime, and implementing the OAuth workflow from the first step (requesting a request token) till the final API call with our access token. We’ll glue the entire OAuth workflow together in our Android application, using different techniques offered by the Android platform. As you can see from the screenshot below, it’s not the most aesthetically pleasing application, but it gets the job done.

Continue reading “Implementing the OAuth flow in Android” »

OAuth in java – the Signpost library

November 8th, 2010 No comments
For a quick command line java example, we’ll be using the oauth-signpost library, a java library with OAuth support that can also be used in Android projects (see Implementing the OAuth flow in Android) . The sample code below illustrates how easy it is to orchestrate the OAuth workflow from a java runtime. The sample program will use a command-line approach guiding you to the oauth flow. It will basically do the following steps :

  • get a request token
  • ask you to authorize access
  • exchange the authorized token for an access token
  • retrieve your contacts

Continue reading “OAuth in java – the Signpost library” »