Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8: Using PhoneGap Plug-Ins > Facebook Authentication and Fetching Frien...

Facebook Authentication and Fetching Friends

Let's leverage the PhoneGap plug-in to build a small application to login to Facebook and fetch friends' info from Facebook.

Our PhoneGap application will use the Facebook native app to perform a single sign on (SSO) for the user through the Facebook-PhoneGap plug-in.

Setting Environment for Android

First, we will need to set up the PhoneGap project for Android. Please refer to Chapter 2 to setup your project for Android. An Android project configuration is shown in Figure 8–1.

images

Figure 8–1. Eclipse Android project configuration

Download the Facebook-connect plug-in from https://github.com/davejohnson/phonegap-plugin-facebook-connect/downloads.

The Facebook-connect plug-in is a zip file. Unzip it in your favorite folder. The folder structure should be similar to Figure 8–2.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint