How to use expo-facebook - 5 common examples

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"
github expo / expo / apps / native-component-list / src / screens / FacebookLoginScreen.tsx View on Github external
          onPress={async () => await Facebook.setAutoInitEnabledAsync(true)}
          title="Set autoinit to true"
github expo / expo / apps / native-component-list / src / screens / FacebookLoginScreen.tsx View on Github external
          onPress={async () => await Facebook.setAutoInitEnabledAsync(false)}
          title="Set autoinit to false"
github Vivify-Ideas / expo-boilerplate / services / AuthService.js View on Github external
loginWithFacebook = async () => {
    return await this.facebookLogin(
      Facebook.logInWithReadPermissionsAsync(FACEBOOK_APP_ID, {
        permissions: ['public_profile', 'email']
      })
    );
  };

expo-facebook

Expo universal module for Facebook SDK

MIT
Latest version published 3 years ago

Package Health Score

66 / 100
Full package analysis