Authentication with facebook in Angularfire

Sunday, July 6, 2014

This is my app.js and i am looking to diplay the user id in the URL but it doesnt work.



$scope.auth = $firebaseSimpleLogin(new Firebase(FBURL));
var userID= $scope.auth.user.id;
$scope.comments = $firebase(new Firebase(FBURL+"//users"+userID+"//Cards"));

$scope.addComment = function(e) {
if (e.keyCode != 13) {
return;
}
if ($scope.auth.user === null) {
alert("You must be logged in to leave a comment");
} else {
$scope.comments.$add({
body: $scope.newComment,
name: $scope.auth.user.name, id: $scope.auth.user.id
});
$scope.newComment = "";
e.preventDefault();
}
}


} ]);


Anyone can help me in figuring it out , what i am doing wrong there? Thank you.







http://ift.tt/1oy5xtA