cordova - How to get the email id in the ngcordova facebook login callback object -


i have installed cordova inapp browser plugin add social facebook login. thing is, in app have allowed sign in through facebook , not sign up. on webapp if user has been registered he/she can access mobile app. signin mobile app, after callback possible receive email id user provided in inapp browser opens on facebook button click? if reveive email id can cross verify his/her existence in database? possible that?

my code this:

    $scope.getdeviceinfo = function() {         $cordovaoauth.facebook("777846192309223", ["email"]).then(function(result) {             alert('success login:'+json.stringify(result));         }, function(error) {             alert('error: '+error);         }); } 

in above email in argument user data want facebook on successful login. getting access_token around 50 digit , 1 parameter expires_in timestamp of 7 digits. not getting email here. how that?

$scope.getdeviceinfo = function() {          $cordovaoauth.facebook("777846192309223", ["email"]).then(function(result) {              alert('success login:'+json.stringify(result));              $localstorage.accesstoken = result.access_token;              if($localstorage.hasownproperty("accesstoken") === true) {  	            $http.get("https://graph.facebook.com/v2.2/me", { params: { access_token: $localstorage.accesstoken, fields: "id,name,gender,location,website,picture,relationship_status",email format: "json" }}).then(function(result) {  	                $scope.profiledata = result.data;  	            }, function(error) {  	                alert("there problem getting profile.  check logs details.");  	                console.log(error);  	            });  	        } else {  	            alert("not signed in");  	            $location.path("/login");  	        }          }, function(error) {              alert('error: '+error);          });  }

store access token localstorage. , using facebook graph api user email id , etc


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -