Reputation: 793
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
Upvotes: 4
Views: 2818
Reputation: 1
I believe there's some issue integrating the module correctly in your project. Please following the next steps:
step 01: yarn add react-native-share or npm install react-native-share
step 02: npx pod-install or cd ios && pod install. (You can skip this step, if you are using this on Android).
Upvotes: 0