TypeError: Cannot read property 'FACEBOOK' of undefined in expo React native for Android

Viewed 922

I am creating an Image share option in expo(only for android in react native) using the react-native-share library, but i am getting the following error TypeError: Cannot read property 'FACEBOOK' of undefined

My React Native code

import Share from 'react-native-share';

const baseImage = "data:image/png;base64,iVBORw0KGgoAA ......"; // base64image

const myCustomShare = async()=> {
  const shareOptions = {
      url: baseImage
  };
  try {
      const shareResponse = await Share.open(shareOptions)
  } catch(error) {
      console.log(error)
  }
}

I have already tried the following steps to resolve this issue but still i am getting the same error

  1. npm install react-native-share
  2. react-native link react-native-share
0 Answers
Related