You no longer need to use react-native-share. Use the native Share
component.
check this post: React Native - can we share an image and text into whatsapp?
Here you can find an example of code:
import React, { Component } from 'react';
import {
Share,
Text,
TouchableOpacity
} from 'react-native';
const shareOptions = {
title: 'Title',
message: 'Message to share', // Note that according to the documentation at least one of "message" or "url" fields is required
url: 'www.example.com',
subject: 'Subject'
};
export default class ShareExample extends React.Component {
onSharePress = () => Share.share(shareOptions);
render(){
return(
<TouchableOpacity onPress={this.onSharePress} >
<Text>Share data</Text>
</TouchableOpacity>
);
}
}
Finally you have to options to send the image + text message: - You can use the url field of the shareOptions adding the remote URI of the image so it can be previewed in the WhatsApp message, and the title or subject fields to add the text. - You can share a base64 file url like this: url: 'data:image/png;base64,'