Trying to Implement facebook Native Login


#1

Hello,

I am trying to implement facebook Native Login.

I have follow this doc : https://docs.ionic.io/services/auth/facebook-native.html
and i have make i button which on-click function is

   $scope.facebookLogin = function () {
        $ionicFacebookAuth.login().then(function(){
            $state.go('menu.home');
        }, function(){
            $scope.error = 'Error logging in.';
        })
    }

But nothing happen and i don’t get any error on console only “Error logging in”

Also.
the cloud init:

.config(function($ionicCloudProvider) {
  $ionicCloudProvider.init({
    "core": {
      "app_id": "Cloud_ID"
    },
  "auth": {
    "facebook": {
      "scope": ["email", "public_profile"]
    }
  }
  });
})

at the app_id i have put the cloud id not Facebook ID


#2

Are you developing an Ionic v1 project manually or are you using Ionic Creator?

Show us your whole module please.


#3

I was developing to Ionic v1 but i bought Ionic Creator for one moth once i thought i must be easier.

function ($scope, $stateParams, $ionicPush) {

    $ionicPush.register().then(function(t) {
      return $ionicPush.saveToken(t);
    }).then(function(t) {
      console.log('Token saved:', t.token);
    });
    
    $scope.$on('cloud:push:notification', function(event, data) {
      var msg = data.message;
      alert(msg.title + ': ' + msg.text);
    });

}

This the module of the “home page” after the user has been login.