The Facebook module for DrupalGap.
Install the InAppBrowser plugin (if you're in PhoneGap):
cordova plugin add org.apache.cordova.inappbrowser
Install these modules on your Drupal site:
Patch the FB OAuth module with this patch:
Patch the Services FB OAuth module with these patches:
On your Drupal site, go to admin/structure/services/list/drupalgap/resources
and check the box next to "connect" in the "fboauth" section.
Next, create an app here:
Under "Advanced" settings in your app on Facebook, set the "Valid OAuth redirect URIs" to:
Download the openfb.js file from this project:
Place it in your app's www directory, then patch the file with these patches:
Then include the openfb.js file in your index.html body before the drupalgap_onload() call:
<!-- Load OpenFB -->
<script src="https://github.com/signalpoint/facebook/raw/7.x-1.x/openfb.js"></script>
Turn on this module in your settings.js file:
Drupal.modules.contrib['facebook'] = {};
Include your Facebook app ID and scope(s) in your settings.js file:
drupalgap.settings.facebook = {
app_id: '123456789',
scope: 'email'
};