有没有办法限制博览会社交媒体上的共享平台,例如,我只想共享一个Facebook和WhatsApp,而不在对话框上显示其他平台
您可以使用官方依赖react-native-share
链接如下:-https://github.com/react-native-community/react-native-share
这些可以使用共享社会财产进行评估,例如
import Share from 'react-native-share';
const shareOptions = {
title: 'Share via',
message: 'some message',
url: 'some share url',
social: Share.Social.WHATSAPP,
whatsAppNumber: "9199999999", // country code + phone number(currently only works on Android)
filename: 'test' , // only for base64 file in Android
};
Share.shareSingle(shareOptions);
如果你有任何问题,请随时问我。
谢谢