How to use the expo-constants.Constants.manifest function in expo-constants

To help you get started, we’ve selected a few expo-constants 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 EvanBacon / expo-native-firebase / rematch / user.js View on Github external
signInWithFacebook: async () => {
      try {
        const {
          type,
          token,
          expires,
          permissions,
          declinedPermissions,
        } = await Facebook.logInWithReadPermissionsAsync(
          Constants.manifest.facebookAppId,
        );
        if (type === 'success') {
          // create a new firebase credential with the token
          const credential = FacebookAuthProvider.credential(token);
          // login with credential
          await firebase.auth().signInWithCredential(credential);
          // Get the user's name using Facebook's Graph API
          // const response = await fetch(`https://graph.facebook.com/me?access_token=${token}`);
        } else {
          // type === 'cancel'
        }
      } catch ({ message }) {
        alert(message);
      }
    },
  },