Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova Facebook Connect plugin fail on init

I installed the FacebookConnect plugin into my cordova project with the code:

cordova -d plugin add /Users/your/path/here/phonegap-facebook-plugin --variable APP_ID="123456789" --variable APP_NAME="myApplication"

Then linked the Facebook API (3.8.0) in /platforms/android/project.properties with:

android.library.reference.2=../../facebook-android-sdk-3.8.0/facebook

Then copied the example 'Simple' into the /www folder, added my app id and changed phonegap.js to cordova.js.

When I compile and run the application on my android phone I receive the following errors:

Cordova Facebook Connect plugin fail on init
Cordova Facebook Connect plugin fail on auth.status

and on login:

Cordova Facebook Connect plugin fail on login!Class not found

LogCat gives the following error:

exec() call to unknown plugin: org.apache.cordova.facebook.Connect

I've scoured the internet but cannot find a solution to this problem.

I did notice that my /platforms/android/res/xml/config.xml file lists the plugin as:

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

When the Documentation says that it should be:

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

But I can't change this as it's automatically generated during the compiling process.

like image 676
Pierowheelz Avatar asked Nov 02 '22 02:11

Pierowheelz


1 Answers

Did you remember to copy (from the download) www/cdv-plugin-fb-connect.js, www/facebook-js-sdk.js into your apps www folder?

like image 110
alloyking Avatar answered Nov 11 '22 04:11

alloyking