Nigel Severing
Nigel Severing

Reputation: 1

Phonegap 3.0 app with facebook login using xCode

I am trying to build an Phonegap app with a facebook login. Using Phonegap 3.0, developing with xCode for iOs.

I followed all steps on https://github.com/phonegap/phonegap-facebook-plugin

After I start my app in the simulator, I keep getting the following error in my output:

ERROR: Plugin 'org.apache.cordova.facebook.Connect' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.

My config.xml:

<feature name="Notification">
    <param name="ios-package" value="CDVNotification" />
</feature>

<feature name="org.apache.cordova.facebook.connect">
   <param name="org.apache.cordova.facebook.connect" value="FacebookConnectPlugin" />
</feature>

Can someone please help me with this? Thanks in advance!

Upvotes: 0

Views: 2324

Answers (3)

R T
R T

Reputation: 195

Earlier I had the same problem, but got it running on phonegap 3.0 through a combination of below things.

  1. Need to use the facebook SDK 3.2.

  2. I found that a few branches of the plugin have the wrong 'cdv-plugin-fb-connect.js' file. You need to find a branch that defines the CDV var.

  3. Need to pay special attention to key definition that have to be entered in the plist file and make sure they matched up with the values in my facebook app page.

  4. defining the plugin in config.xml like the answer above was also necessary

Upvotes: 2

btemperli
btemperli

Reputation: 271

It is possible to use the facebook-plugin with Phonegap 3.0.0 / Cordova 3

I have tried it for long time and it works for me now. You have to change your config.xml in xCode to this:

<feature name="org.apache.cordova.facebook.Connect">
    <param name="ios-package" value="FacebookConnectPlugin" />
</feature>

After that i used this manual: https://github.com/phonegap/phonegap-facebook-plugin

Upvotes: 0

Matt
Matt

Reputation: 176

I believe your issue is that is Phonegap 3.0 your plugins are to be installed through the Phonegap CLI.

This is from the upgrade guide from 2.9.0 to 3.0.0:

Copy your config.xml into the www folder, and remove any plugin definitions. You will modify settings here instead of the platform folder.

Use the cordova CLI tool to install any plugins you need. Note that the CLI handles all core APIs as plugins, so they may need to be added. Only 3.0.0 plugins are compatible with the CLI.

Found here: http://docs.phonegap.com/en/edge/guide_platforms_ios_upgrading.md.html

Further notes stating Phonegap plugins will not work on 3.X.X:

PLEASE NOTE: Unless explicitly stated, most of these plugins will not work with Cordova/PhoneGap 3.x.x out of the box. They will need updating before they can be used via the plugin add interface.

Found here: https://github.com/phonegap/phonegap-plugins/tree/master/iOS

I hope this sheds some light on your issue.

EDIT: Here is a link to the Phonegap 3.0.0 Facebook plugin: https://build.phonegap.com/plugins/1

Upvotes: 0

Related Questions