0
Firebase的FacebookAuthProvider.addScope有什麼功能?是否需要檢索訪問令牌?Firebase的FacebookAuthProvider.addScope有何功能?
Firebase的FacebookAuthProvider.addScope有什麼功能?是否需要檢索訪問令牌?Firebase的FacebookAuthProvider.addScope有何功能?
這是用來添加的Facebook的OAuth 2.0範圍,如: 'public_profile', '電子郵件', 'user_likes', 'user_friends' 等 例如:
var provider = new firebase.auth.FacebookAuthProvider();
provider.addScope('user_friends');
provider.addScope('user_likes');
// This will open the Facebook sign in page and ask user to consent
// to the additional scopes.
firebase.auth().signInWithPopup(provider).then(function(result) {
if (result.user) {
// Additional user info like Facebook account url, gender, etc.
console.log(result.additionalUserInfo.profile);
// Facebook access token returned in the process
// for the scopes requested.
console.log(result.credential.accessToken);
}
});
所以,這怎麼的accessToken有要使用的? –
查看Facebook文檔。 – bojeil