您好尝试使用 react-native-share 共享图像和链接,以便像`
一样单独共享图像const shareOptions = {
title: "Share Route via",
message: message,
url: "http://something.com/route"
//url : "data:image/png;base64,base64string"
};
Share.open(shareOptions);
`
图片和网址都只能添加一个。像这样将它们放在一起
const shareOptions = {
title: "Share Route via",
message: message,
urls: [
"http://something.com/route",
"data:image/png;base64,base64string"
]
};
Share.open(shareOptions);
它不起作用
编辑1
没有错误,但是当我仅共享图像时,我可以在WhatsApp中看到该图像。但是当我同时共享链接和图像(即base64string)时,它会被共享为那长的base64string本身,而不是图像
感谢任何帮助 预先感谢。