在facebook / connect-js中,有一些非常简洁的功能,例如“FB.login”用于登录和FB.logout,用于注销,例如,是否有用于验证的类似物?
答案 0 :(得分:1)
您可以使用FB.login进行身份验证。
FB.login(function(response) {
var access_token = response.session.access_token;
if (response.session) {
if (response.perms) {
// user is logged in, everithig is ok
} else {
// user is logged in, but did not grant any permissions
}
} else {
// user is not logged in
}
}, {perms:'read_stream,publish_stream,offline_access'});