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
- npm install react-native-share
- react-native link react-native-share