【发布时间】:2020-11-13 08:58:32
【问题描述】:
我正在使用Share 组件来向社交媒体分享一些数据,但我不知道如何分享像 vinted 应用程序这样的图像(cf image)。
onShare = async () => {
try {
const result = await Share.share({
title: "Mariez-Vous",
message:
`Photo partagée : ${this.props.navigation.state.params.photo}
Nom : ${this.props.navigation.state.params.societe}
Site web : https://www.mariezvous.fr/`,
});
if (result.action === Share.sharedAction) {
if (result.activityType) {
// shared with activity type of result.activityType
} else {
// shared
}
} else if (result.action === Share.dismissedAction) {
// dismissed
}
} catch (error) {
alert(error.message);
}
};
这是我正在使用的代码,但图像没有显示它只是传递一个 url。
【问题讨论】:
标签: react-native share