我正在尝试在用户通过FB登录后处理响应,并且我正确地将响应作为对象接收。当我尝试保存它时设置一个状态' userInfo'我尝试控制日志状态我得到一个错误190.任何想法?这是我的代码
请求:
async loginWithFacebook() {
const {type, token} = await Expo.Facebook.logInWithReadPermissionsAsync
('mytoken 32832839etc', {permissions: ['public_profile']})
if (type == 'success') {
const credential = firebase.auth.FacebookAuthProvider.credential(token)
const response = await fetch(
'https://graph.facebook.com/me?access_token=${token}&fields=id.name.picture.type(large)');
const userInfo = await response.json();
this.setState({ userInfo });
console.log(this.state.userInfo);
Alert.alert(
'Logged In'
);
firebase.auth().signInWithCredential(credential).catch((error) =>{
console.log(error)
})
}
return
}

这是错误消息
对象{ "错误":对象{ "代码":190, " fbtrace_id":" ERl8VWIrluv", " message":"无效的OAuth访问令牌。", "输入":" OAuthException", }, }