2011-10-13 74 views

回答

0

那麼你可以使用FB.login()scope參數:

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 + '.'); 
     FB.logout(function(response) { 
     console.log('Logged out.'); 
     }); 
    }); 
    } else { 
    console.log('User cancelled login or did not fully authorize.'); 
    } 
}, {scope: 'email'}); 

諷刺的是,Facebook的只是posted a tutorial與此相關的昨天。我還寫了一個tutorial關於這一段時間。

相關問題