我喜欢通过社交媒体共享应用程序链接,这样当接收者单击共享链接时,它将打开安装了共享信息的应用程序(深链接)。 请在此处找到代码:
onShare = (articleShare) => {
try {
const result = Share.share({
title: articleShare.articleTitle,
message: articleShare.articleContent,
url:'AppName://ArticleDetail/'+articleShare._id,
},
{dialogTitle: 'Share Article',});
if (result.action === Share.sharedAction) {
Meteor.call('ShareArticleNotification', articleShare);
};
} catch (error) {
alert(error.message);
};
};
答案 0 :(得分:0)
const result = await Share.share({
message: `https://play.google.com/store/apps/details?id=com.facebook.katana&hl=en&gl=US`,
});