Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.loginFB = function() {
- Facebook.login(function(loginResponse) {
- if(loginResponse.status == 'connected') {
- $rootScope.$storage.local.userLoggedIn = true;
- // Working only if the facebook app url is: http://localhost/ and I'm really from localhost
- Facebook.api('/me', function(facebookUser) {
- $rootScope.$storage.local.currentUser = facebookUser;
- });
- }
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement