First ensure that you have Basic PhoneGap application running on your android. Check this tutorial if needed. Official tutorial is not so good but might help you out if Phonegap Facebook tutorial here fails. For additional information go to https://github.com/davejohnson/phonegap-plugin-facebook-connect/blob/master/README.md.

  1. Download PhoneGap Facebook plugin from https://github.com/davejohnson/phonegap-plugin-facebook-connect/tree/master/www
  2. Move cdv-plugin-fb-connect.js into your android phonegap webroot assets/www
  3. Include it in index.html <script type=”text/javascript” charset=”utf-8″ src=”cdv-plugin-fb-connect.js”></script>
  4. Add <plugin name=”org.apache.cordova.facebook.Connect” value=”org.apache.cordova.facebook.ConnectPlugin” /> into res/xml/plugins.xml
  5. Download facebook_js_sdk.js from https://github.com/davejohnson/phonegap-plugin-facebook-connect/tree/master/lib
  6. Create package org.apache.cordova.facebook and class ConnectPlugin.java. Copy contents of this file into it  https://github.com/davejohnson/phonegap-plugin-facebook-connect/blob/master/native/android/src/org/apache/cordova/facebook/ConnectPlugin.java
  7. Add package com.facebook.android and .java files from https://github.com/facebook/facebook-android-sdk/tree/master/facebook/src to your java source. This enables ConnectPlugin.java to compile.
  8. Add import to com.package.your.R; or whatever is your android package so that your R.java will be imported to FbDialog.java.
  9. Merge facebook icons from https://github.com/facebook/facebook-android-sdk/tree/master/facebook/res to your project res folder. This enables Facebook SDK sources to compile. Espacially is needed this image https://github.com/facebook/facebook-android-sdk/blob/master/facebook/res/drawable/close.png
  10. Verify the facebook using javascript methods in here. https://github.com/davejohnson/phonegap-plugin-facebook-connect/blob/master/example/www/index.html
  11. Dont forget to register you facebook android app, add your APP id to the init method and register your app signing key in facebook. About creating signing key hash look into https://developers.facebook.com/docs/mobile/android/build/#sig

Download the Full Eclipse project sources here:  FacebookTest

In case of any issues don’t hesitate to post into comment and I will respond promptly if I can help.