FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
// the user is logged in and has authenticated your
// app, and response.authResponse supplies
// the user's ID, a valid access token, a signed
// request, and the time the access token
// and signed request each expire
var uid = response.authResponse.userID;
alert(uid);
} else if (response.status === 'not_authorized') {
// the user is logged in to Facebook,
// but has not authenticated your app
// logged in and connected user, someone you know
var uid = response.id;
alert(uid);
} else {
// the user isn't logged in to Facebook.
alert("the user isn't logged in to Facebook.");
}
});
not_authorized 时如何获取 uid?