I'm trying to share an image. I install react-native-share
npm i react-native-share --save
then import
import Share from 'react-native-share';
but when i try to use this library:
const Testing = () => {
let shareImage = {
title: 'React Native',
url: 'https://static.wikia.nocookie.net/comicdc/images/d/d9/Batman_jim_lee.jpg/revision/latest/scale-to-width-down/280?cb=20140708014954&path-prefix=es'
};
Share.open(shareImage)
.then((res) => {
console.log(res);
})
}
I get this error Uncaught TypeError: Cannot read properties of undefined (reading 'FACEBOOK') The error disappear when I delete:
Share.open(shareImage)
.then((res) => {
console.log(res);
})
Frankly i don't know what to do, i have searched another ways (for example expo) to share an image for react native but nothing works
Error Image in Chrome
Error Image in Firefox
Thanks in advance