Android Gets Facebook Graph API Before the iPhone

Facebook-For-Android-LogoFacebook announced new mobile social networking functionality for the Android platform this week. At Google I/O, Google’s developer conference, executives routinely made fun of Steve Jobs and Apple, but Facebook’s role in the drama was overlooked by the press. Facebook’s mobile development team soft launched a Facebook SDK for Android, bringing functionality that was previously only available on the iPhone to the Android platform. It gets better: Facebook gave the Android platform a de facto exclusive on two of its newest initiatives: Open Graph APIs and OAuth 2.0.

Facebook at Google I/O Developer Conference

I chatted Charles Wu, Facebook’s program manager for mobile, at Google’s Developer Sandbox. Steven Soneff, a Stanford Graduate student intern for Facebook, also gave me an in depth technical walk through of his work on the Android developer tool.

Facebook’s Goal At Google I/O

Facebook’s goal is to find interesting game and app developers to try out the new Android SDK. Facebook is showing select developers their vision of where they are going on Android. When Facebook gets developer feedback, they will massage the new technology. Once Facebook is satisfied that people are happy with their new Android developer tools, they will open it up as an official SDK.

Facebook’s Software Developer Kit (SDK) for Android

Facebook’s SDK for Android is like the Facebook SDK for the iPhone, but better. Its more advanced, implementing Faceboook’s newly announced Graph API and other new features like deep linking. Facebook’s goal is to make it easy for developers to put Facebook in their app, using a native SDK for Android.

You can drop in a Connect button in your application, and authenticate users with OAuth 2.0 – then your app can access Facebook’s new Open Graph initiative.

Data privacy issues are reduced, because you users are logged into Facebook and you access their permission settings.

Its clear to users what’s happening, because they actually switch back and forth between your app and the Facebook for Android app when accessing core Facebook features.

Facebook highlighted three things about its Android developer tool:

  1. Authorizing users with OAuth 2.0
  2. Calling to Facebook APIs from Android
  3. Deep linking between apps and Facebook

OAuth 2.0 User Authentication

The Facebook SDK encapsulates OAuth’s complicated authentication process.

For developers, it looked pretty simple to create and store an authentication token with the new SDK.

For app users, it was completely seamless – happening behind the scenes when they clicked a Facebook Connect button.

The programming process for Java programmers:

1. Instantiate a Facebook object
2. Authorize the Facebook object
3. Get an authorization token
4. Make requests using the token

Calling Facebook APIs from Android

The Facebook Android SDK creates Android “wrappers” for existing web services – Facebook’s RESTful APIs, and Open Graph APIs.

Developers can do anything they like with the new Graph API. Also, all the usual Facebook API calls app developers use to make apps on Facebook.com also work on Android devices – like the API calls to get friend lists, make wall posts and publish into a user’s stream on Facebook.

Deep linking to Facebook on Android

Facebook now lets Android app developers link deep into Facebook apps. This means that Android apps can create a seemless experience integrating their apps and Facebook, directly accessing specific parts of a users Facebook app, deep within the Facebook app’s navigation.

Example of deep linking into Facebook Apps:

If a user is playing a game and wants to check out another player’s Facebook profile – they simply click a button and the profile page displays on their phone. The users do not have to navigate within their Facebook app to find the right information, it simply appears.

Of course, the Android app developer sets up this experience by programming where the user should drop into their Facebook app. The important point is that Android app developers can now prewire this integrated Facebook app experience using the new Facebook app for Android SDK.

Developers can check out the new tool here: http://github.com/facebook

Update
As some commenters pointed out, it appears as no Android SDK is on the site yet (although we’d expect it to be posted shortly). Below is the slide at Google I/O where we learned about the new SDK.

Facebook Android SDK

If you want to stay on top of the best practices for integrating Facebook and other social features into mobile experiences, come to our Social Developer Summit, taking place on June 29th in San Francisco, CA.

-Social Developer Summit Banner-

Related Stories
Mediabistro Course

Blogging: Analytics, SEO, and Content

Blogging: Analytics, SEO, and ContentWork with the former marketing director at Conde Nast Digital to improve your search rankings, integrate social, and increase traffic to your blog! Starting November 5, Jim Hopkinson will teach you how to analyze KPIs, monetize your blog through ads, sponsorships, and affiliates, and leverage your blog toward a larger platform such as publishing, speaking, or consulting. Register now!