Facebook login + inappbrowser + ionic 1


#1

Hey everyone, i am starting with ionic and have some problems cuz i am still learning… i just folowed and completed this tutorial: https://docs.ionic.io/services/auth/facebook-auth.html with no problems, but my app is not doing anything after login, you just see the facebook window, log in and get redirected back to the same home view with no info, i need to manage the users data like profile picture, name… and my code is:

.controller(‘auth’, function($scope, $ionicAuth, $ionicUser,$state) {

$scope.FacebookLogin = function(){

  $ionicAuth.login('facebook').then(
    //do something, but what!?
    // var full_name = $ionicUser.social.facebook.data.full_name;
    // var profile_picture = $ionicUser.social.facebook.data.profile_picture;
    // var facebook_raw_data = $ionicUser.social.facebook.data.raw_data;
  );
  //  $state.go('dashboard');

}

Could you gimme and example what to do now? whats the next step? i know i have to validate if user is logged and then show the dashboard view but i am stucked already now. i am better in front-end XD.
Thanks in advance


#2

Follow the steps mentioned in bellow link

https://blog.brunoscopelliti.com/facebook-authentication-in-your-angularjs-web-app/