Hi,
I keep getting the above mentioned error
angular.js:12520 ReferenceError: facebookUser is not defined
on the line in the eventlistener where I call facebookUser.
$rootScope.$on('fbLoginSuccess', function(name, response) {
facebookUser.then(function(user) {
user.api('/me').then(function(response) {
console.log(response);
if (response.status === 'connected') {
// Logged into your app and Facebook.
$scope.facebooklogin(response.id);
} else if (response.status === 'not_authorized') {
// The person is logged into Facebook, but not your app.
$("#loginWarning").innerHTML = 'Please log ' +
'into this app.';
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
$("#loginWarning").innerHTML = 'Please log ' +
'into Facebook.';
}
});
});
});
I link facebookUtils.js after angular and before my app.
This is how I inject the dependancy:
var myApp = angular.module('myApp', ['facebookUtils', 'ngRoute', 'ngSanitize']);
myApp.constant('facebookConfigSettings', {
'appID' : 'myappId'
});
What am I doing wrong? Am I doing anything wrong?
Hi,
I keep getting the above mentioned error
on the line in the eventlistener where I call facebookUser.
I link facebookUtils.js after angular and before my app.
This is how I inject the dependancy:
What am I doing wrong? Am I doing anything wrong?