如何使用 Firebase Auth 访问 Facebook 范围数据
How do you access Facebook scope data with Firebase Auth
我正在尝试访问 Facebook 请求的数据。这是我的代码:
var auth_provider_facebook = new firebase.auth.FacebookAuthProvider();
/// BEGIN: configure the facebook authorization provider.
auth_provider_facebook.addScope('user_birthday');
auth_provider_facebook.addScope('user_about_me');
auth_provider_facebook.addScope('user_work_history');
auth_provider_facebook.addScope('user_education_history');
// auth_provider_facebook.addScope('user_birthday,user_about_me,user_work_history,user_education_history');
/// END: configure the facebook authorization provider.
我试过单线和多线,但我仍然无法获取数据。文档发现 here has absolutely no information on retrieving data from the scope. The documentation provided here mentions a facebook
variable as part of the result, but it's always undefined
. There's more documentation here 提出了 thirdPartyUserData
属性 也总是 undefined
.
我该如何获取这些数据?
当您进行身份验证时,onAuthStateChange 会给您一个令牌。这是我的,关联了多个帐户。
你能找到吗?您使用的是 Firebase v3 吗?
我正在尝试访问 Facebook 请求的数据。这是我的代码:
var auth_provider_facebook = new firebase.auth.FacebookAuthProvider();
/// BEGIN: configure the facebook authorization provider.
auth_provider_facebook.addScope('user_birthday');
auth_provider_facebook.addScope('user_about_me');
auth_provider_facebook.addScope('user_work_history');
auth_provider_facebook.addScope('user_education_history');
// auth_provider_facebook.addScope('user_birthday,user_about_me,user_work_history,user_education_history');
/// END: configure the facebook authorization provider.
我试过单线和多线,但我仍然无法获取数据。文档发现 here has absolutely no information on retrieving data from the scope. The documentation provided here mentions a facebook
variable as part of the result, but it's always undefined
. There's more documentation here 提出了 thirdPartyUserData
属性 也总是 undefined
.
我该如何获取这些数据?
当您进行身份验证时,onAuthStateChange 会给您一个令牌。这是我的,关联了多个帐户。
你能找到吗?您使用的是 Firebase v3 吗?