Programming the Android Facebook SDK

By the time you read this, Android will likely be the largest smartphone OS in the world. Because it is open source, with the help of Google, Android can run on any device in many different forms. Best of all, every update by the community gets submitted back to the main OS, making Android a quickly developing platform to build apps. That's why it makes sense to integrate Facebook into Android, and in fact, you can already find Android devices as I write this that integrate Facebook very deeply into the mobile experience.

I've asked Ray Hunter, one of the best Android developers I know, to show you how you can integrate a Facebook experience into an Android app.

Downloading the Facebook Android API

Android integration with Facebook begins with using Facebook's mobile API. Its API is stored on GitHub, which is an online GIT repository. First, I show you how to download the Facebook API from GitHub. You need to have a GIT client to download the project from GitHub (you can find some good clients at http://en.wikipedia.org/wiki/Git_(software)#Portability). After you have the client installed, you need to run the following command, which will download the Facebook Android SDK (as a clone) onto your hard drive:

got clone git://github.com/facebook/facebook-android-sdk.git

When run, that command creates a new project directory named facebook-android-sdk. This directory contains the Facebook Android API that you will be using with your Android application. ...

Get Facebook® Application Development For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.