Adding Cordova Facebook SDK 4 Plugin to a Phonegap Project

Recently I had a need to install the Facebook SDK to help Facebook keep track of app installs.

When reading this documentation:
http://ionicframework.com/docs/v2/native/Facebook/

Running this command
cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication"

Doesn’t quite generate the right edits to config.xml. ┬áIf you are using phonegap, use these settings for config.xml

<gap:preference name="android-build-tool" value="gradle" />
<gap:plugin name="cordova-plugin-admobpro" source="npm" />

<gap:plugin name="cordova-plugin-facebook4" source="npm" spec="1.7.0">
<gap:param name="APP_ID" value="app_id_value" />
<gap:param name="APP_NAME" value="app_name" />
</gap:plugin>

And you should be good to go.