Why do I keep getting malformed requests!


#1

I did the whole facebook tutorial as written in the Expo guides.

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}!, ); } }

Now when I try to add a fields=last_name for example (or any field) to the url ,I always get a malformed token error!! What am i doing wrong