My friend called this like lambda-calculus, even though I know some lambas -- I am still confused how the authorization really works to get the access token.
So please explain this code, hopefully line-by-line. Source of the example is here.
FB.login(function(response) {
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function(response) {
console.log('Good to see you, ' + response.name + '.');
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
});
P.s. Trying to categorize things here, the q is a sub-problem.
Perhaps related