How to use the expo-facebook.initializeAsync function in expo-facebook

To help you get started, we’ve selected a few expo-facebook examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dooboolab / hackatalk-mobile / src / components / screen / Login.tsx View on Github external
const facebookLogin = async (): Promise => {
    setSigningInFacebook(true);
    try {
      await Facebook.initializeAsync(
        Constants.manifest.facebookAppId,
        undefined,
      );
      const result = await Facebook.logInWithReadPermissionsAsync({
        permissions: ['email', 'public_profile'],
      });

      if (result.type === 'success') {
        const { token, expires, permissions, declinedPermissions } = result;

        const response = await fetch(
          `https://graph.facebook.com/me?fields=
            id,name,email,birthday,gender,first_name,last_name,picture
            &access_token=${token}`,
        );
        // console.log('success', response);
github expo / expo / apps / native-component-list / src / screens / FacebookLoginScreen.tsx View on Github external
          onPress={async () => await Facebook.initializeAsync(appId)}
          title="Initialize Facebook SDK"

expo-facebook

Expo universal module for Facebook SDK

MIT
Latest version published 3 years ago

Package Health Score

64 / 100
Full package analysis