Facebook logInWithReadPermissionsAsync

Hi,

I tried to use the same Facebook authentication that i’m using in my expo apps (ios & android only) in my web project.

async function getFacebookToken() {
    try {
        console.log('getFacebookToken');
        const res: Facebook.Response = await Facebook.logInWithReadPermissionsAsync(
            Config.facebookAppId, // My Facebook app Id
            {
                permissions: ['public_profile', 'email'],
            }
        );
        if (res.type === 'success') {
            return res.token;
        }
    } catch (e) {
        throw new Error(`An error occured : ${e.message}`);
    }

    throw new Error('Impossible to connect via Facebook :(');
}

However, i’m facing this error message in console on web

Best regards,
Louis

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.