在我的网站上,“Im”用Facebook API进行认证。
<fb:login-button onlogin="fbLoginEvent(arguments)">Enter with Facebook</fb:login-button>
我的职能是:
function fbLoginEvent( args ) {
//console.log( "fbLogin", args );
//var session = FB.getSession();
var session = FB.getAuthResponse();
if (session) {
fbCheckSession(session, function(data) {
if (data.result) {
fbLoginNow();
} else {
$( #facebook-register ).data("overlay").load();
}
});
}
}
我的职责是检查本届会议:
var fbLogin = { status: false, uid: 0, access_token: "" };
function fbCheckSession( session, callback ) {
if ( session && $.type(callback) == "function" ) {
ajaxCall( "facebook", "check_session", {uid: session.uid, token: session.access_token}, function(data){
if ( data.result ) {
fbLogin.status = true;
fbLogin.fbuid = session.uid;
fbLogin.uid = data.info.id;
fbLogin.access_token = session.access_token;
callback( { result: true, info: { name: data.info.name, fbLogin: fbLogin } } );
} else {
callback( { result: false } );
}
});
}
}
I made various checks and I have noticed that uid and tokens value are empty. Any solution? Thk