我有一个 Facebook Javascript,它报告用户是否已登录,并且我想存储一个会话变量,以便我可以告诉我的网站用户已登录。这里是脚本。
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
var uid = response.authResponse.userID; --> want to store this in a session variable
var accessToken = response.authResponse.accessToken; --> want to store this in a session variable
} else if (response.status === 'not_authorized') {
// the user is logged in to Facebook,
// but has not authenticated your app
} else {
alert("your not connected");
}
});
};