javascript - Ionic FacebookConnectPlugin -
i trying implement facebook login in ionic application. when user try login via facebook @ first, says "invalid hash key." following below. after this, i've check hash key added on facebook developer site. keys displayed on app , written in facebook developer sites same following below: also, strange thing after happened, when tried login again facebook developer account, works. after this, try login normal facebook account, doesn't work. what's wrong , why happens? implemented codes here:
$scope.fblogin = function(){ var fbloginparams = ['public_profile','email']; $ionicloading.show({template: '<ion-spinner icon="lines" class="spinner-calm"></ion-spinner><p>getting facebook login status...</p>'}); facebookconnectplugin.getloginstatus( function(response) //already facebook logined { //get profile facebook if (response.status == "connected") { $ionicloading.hide(); $state.go('main.home'); } else { console.log(response); //prepare facebook login $ionicloading.hide(); $ionicloading.show({template: '<ion-spinner icon="lines" class="spinner-calm"></ion-spinner><p>logging in facebook...</p>'}); facebookconnectplugin.login(fbloginparams, function(response) { $ionicloading.hide(); $state.go('main.home'); }, function (response) { //facebook login failed. $ionicloading.hide(); alert('failed login facebook'); } ); } }, function(response) // not logined { } ); }