简体   繁体   中英

Ionic + Cordova + Facebook login: 51 F02 FacebookConnectPlugin sClass not found

I am trying to add facebook login to my application. I followed the same process as mentioned in this blog of ionic " https://ionicthemes.com/tutorials/about/native-facebook-login-with-ionic-framework " But somehow its not working. Its failing at $cordovaFacebook.login. Its not going inside.

 $scope.fbLogin = function(){
   $cordovaFacebook.login(["public_profile", "email", "user_friends"]) //Failing in this step
   .then(function(success) {

  $cordovaFacebook.api("me?fields=id,name,picture", [])
  .then(function(result){
    var userData = {
      id: result.id,
      name: result.name,
      pic: result.picture.data.url
    }
    //Do what you wish to do with user data. Here we are just displaying it in the view
    $scope.fbData = JSON.stringify(userData, null, 4);


  }, function(error){
    // Error message
    console.log(error);
  })

}, function (error) {
  console.log(error); // error comes as "Class not found"
});
}

What i am missing here. After debugging i found it says

51 F02 FacebookConnectPlugin sClass not found

See attached image. What is wrong here. 在此处输入图片说明

Damm...Issue is with cordova 5.4.1. I degraded to version 5.3.3 and it started working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM