This code example in official documentation explains how to login but I am also looking for a method by which I can logout also, is there any method by which I can logout:
//from official documentation
async function logIn() {
const { type, token } = await Expo.Facebook.logInWithReadPermissionsAsync(‘<APP_ID>’, {
permissions: [‘public_profile’],
});
if (type === ‘success’) {
// Get the user’s name using Facebook’s Graph API
const response = await fetch(
https://graph.facebook.com/me?access_token=${token}
);
Alert.alert(
‘Logged in!’,
Hi ${(await response.json()).name}!
,
);
}
}