0
我仍然應該使用permissions.request還是有新的方法來做到這一點?我看到了衝突的信息。 謝謝!在JavaScript上使用Javascript請求擴展權限的正確方法是什麼?
我仍然應該使用permissions.request還是有新的方法來做到這一點?我看到了衝突的信息。 謝謝!在JavaScript上使用Javascript請求擴展權限的正確方法是什麼?
那麼你可以使用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關於這一段時間。