Facebook plugin not working

following the next link http://ngcordova.com/docs/plugins/facebook/ I type the next line

cordova plugin add https://github.com/Wizcorp/phonegap-facebook-plugin.git --variable APP_ID=“123456789” --variable APP_NAME=“myApplication”

with a the plugin locally. After doing that, the ionic build faild

2 warnings and 1 error generated.


The following build commands failed: 	CompileC build/AppName.build/Debug-iphonesimulator/AppName.build/Objects-normal/i386/FacebookConnectPlugin.o AppName/Plugins/phonegap-facebook-plugin/FacebookConnectPlugin.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Error: Error code 65 for command: xcodebuild with args:

So I decided to go with

cordova plugin add cordova-plugin-facebook4 --save --variable
APP_ID=“123456789” --variable APP_NAME=“myApplication”

And it work’s perfectly, but when I add inside the .config of the file app.js this lines

var appID = 123456789;
var version = "v2.6";
$cordovaFacebookProvider.browserInit(appID, version);

I get this error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
ReferenceError: facebookConnectPlugin is not defined

When to index.html and add
And now I’m getting

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
TypeError: Cannot read property 'browserInit' of undefined

Need some help here please. The official plugin for ngController can’t build and the secondary one can’t use it on website :frowning: