Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. $scope.loginFB = function() {
  2. Facebook.login(function(loginResponse) {
  3. if(loginResponse.status == 'connected') {
  4. $rootScope.$storage.local.userLoggedIn = true;
  5. // Working only if the facebook app url is: http://localhost/ and I'm really from localhost
  6. Facebook.api('/me', function(facebookUser) {
  7. $rootScope.$storage.local.currentUser = facebookUser;
  8. });
  9. }
  10. });
  11. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement