Checklist for setting Facebook Connect for PhoneGap

phonegap-robotNew hybrid apps developers might find difficult to get Facebook connect work in a PhoneGap / Ionic project. This tutorial will list out some checklist for setting Facebook Connect for PhoneGap – Ionic. We will use the Simple Facebook Connect without PhoneGap plugin to be able to login with Facebook in your apps.

  • First, clone OpenFB project and copy necessary files to your ionic/phonegap project (openfb.js, html code and inclusion statements in index.html).
  • Remember to add inappbrowser plugin to your project:

    [bash]cordova plugins add org.apache.cordova.inappbrowser[/bash]

  • Create a new facebook apps at https://developers.facebook.com/apps/.
  • Remember the bundle id in your config.xml of your ionic/phonegap project. Go to your Facebook apps and “Add Platform” in your apps “Settings” tab. Put the bundle id into “Bundle ID” for iOS and “Package Name” for Android. We can leave the “iPhone Store ID” and “Class Name” + “Key Hashes” blank in development mode.
    • Do not use your existing apps ID since it might be connected to another Facebook apps. We must use the real apps ID or leave it blank to get the Facebook features work.
  • Remember to publish the apps in the “Dashboard” tab (you need to enter a contact email) and answer “Yes” to “Do you want to make this app and all its live features available to the general public?” in the “Status and Review” tab. If you forgot this step, you will receive an error told that “App Not Setup: The developers of this app have not set up this app properly for Facebook Login.” when running in your simulators/devices.

It’s done. Enjoy!

Similar Posts

  • Install KingSoft Office for Fedora 17/18/19 or CentOS

    Kingsoft Office is an office suite developed by Zhuhai based Chinese software developer Kingsoft.  This offers most of the features and functionality like Microsoft Office. This tutorial guides how to install KingSoft Office for Fedora users. KingSoft Office includes the following components: Kingsoft Writer, Kingsoft Presentation and Kingsoft Spreadsheet. Kingsoft Office personal version is completely free. With…

  • Upgrading Percona XtraDB Cluster

    Guide can be found at https://www.percona.com/doc/percona-xtradb-cluster/5.7/howtos/upgrade_guide.html. There is no need to re-invent the wheel. I am too lazy to do it. Issue 1: If you are running mysql_upgrade and face the following error: “mysql_upgrade: [ERROR] 1136: Column count doesn’t match value count at row 1”, just do as follows: Clone https://github.com/mysql/mysql-sys and go to this folder. Run…

  • Running Selenium with FireFox browser in CentOS

    Quick note here the necessary steps to install and run Selenium with FireFox browser in CentOS. We will need to setup XWindows for Headless Selenium with FireFox webdriver. First, install Xvfb: [bash]yum -y install firefox Xvfb libXfont Xorg[/bash] Then, install X-desktop: [bash]yum -y groupinstall "X Window System" "Desktop" "Fonts" "General Purpose Desktop"[/bash] Next, launch a XWindows Virtual…

  • Backup Proxmox with NFS

    Well, there are plenties of online tutorials about proxmox and backup itself, however, there is really difficult to find a working one with NFS installation, configuration and make it work with Proxmox. So I decide to add a short tutorial on how to backup proxmox with nfs. Install NFS on remote storage server In this case,…

  • Upgrade to latest nginx on Debian

    By default, Debian 7 comes with nginx 1.2.x which is a little bit out-dated. This short tutorial will introduce how to upgrade to latest nginx on Debian. First, add necessary wheezy-backports to the sources.list (/etc/apt/sources.list): [bash]deb http://ftp.de.debian.org/debian/ wheezy-backports main contrib non-free[/bash] Then, update with the new source: [bash]aptitude update aptitude -t wheezy-backports install nginx[/bash] That’s all 🙂 Troubleshoots…

One Comment

  1. Unfortunately this plugin has problems with android and ios.
    It does work on local development but when you use it on the actual device the user is stuck to the returning (blank) screen that receives the token and instructs the webview to close.

Leave a Reply

Your email address will not be published. Required fields are marked *