My piece of code shown below:
fbSocialLogin = async () => {
try {
const { type, token } = await Facebook.logInWithReadPermissionsAsync(
“582284132122368”,
{ permissions: [‘email’, ‘public_profile’] }
);
switch (type) {
case “success”: {
console.log(token);
const response = await fetch(https://graph.facebook.com/me?access_token=${token}
);
const profile = await response.json();
console.log(JSON.stringify(profile));
return profile;
break;
}
case “cancel”: {
return “cancel”;
break;
}
default: {
return “failed”;
}
}
} catch (error) {
alert(error.message);
}
};
It return only name and id params but according to permission its not return full response please help me sort out this problem …