phonegap plugin on AngularJS ngCordova

1

I have a slight difficulty in understanding how to install these plugins, in general, they never work for lack of some file that I did not call or anything like.

For example, this facebook plugin that phonegap forces you to use for better performace results, link . Browser method via ngCordova: link

I install it via git-shell, all right. I move the js file to the js folder of my root, I call this js in the index, but even so, when I call the function, it tells me it is undefined.

Is there anything else I need to know when installing these plugins?

Thank you!

Edit:

I'm trying to insert the method this way:

myApp.config(function($cordovaFacebookProvider) {
var appID = 123456789;
var version = "v2.0"; // or leave blank and default is v2.0
$cordovaFacebookProvider.browserInit(appID, version);
});

But the following error appears: Uncaught Error: [$injector:modulerr]

I tried it this way, but it did not work either:

$scope.testeButton = function(name,description,image){
        myApp.config(["$cordovaFacebookProvider",function($cordovaFacebookProvider) {
              var appID = xxxxxxxxxx;
              var version = "v2.5"; // or leave blank and default is v2.0
              $cordovaFacebookProvider.browserInit(appID, version);
              console.log('aqui');
            }]);

        var options = {
            method: "feed",
            link: "http://example.com",
            caption: "Such caption, very feed."
      };
        $cordovaFacebook.showDialog(options)
            .then(function(success) {
              // success
            }, function (error) {
              // error
            });
    }

cordovaFacebook is not defined

    
asked by anonymous 18.04.2016 / 18:36

0 answers