Cordova, Facebook, Android and no Eclipse

This post relates to creating an Android application with Facebook support (via phonegap-facebook-plugin using Cordova 3.5 and, specifically, without Eclipse. Most existing documentation expects you to spin up Eclipse to link the Facebook libraries – but, we’re using an automated build system with Grunt so that’s not a possibility.

Firstly – the steps to get it working:

  1. Add the Cordova Facebook plugin:
  2. Edit platforms/android/ and add: where n is the next available reference index. Also note the target parameter here as you’ll need it next:
  3. Update the Android project for the plugin:  where android-19 should match the target parameter from above.
  4. Prepare and build your application: