【发布时间】:2019-01-29 10:46:00
【问题描述】:
我有一个应用程序,一旦用户点击社交图标,我想在其中将特定数据分享到社交媒体,如 facebook、twitter、pinterest 等。我已经使用了 react native 链接,它将我发送到这些平台的页面。但是我想在单击后与这些共享数据。我为whatsapp做了这个,就像这样:
<TouchableOpacity onPress={() => {
let url = 'whatsapp://send?text=${hello}&phone=${01753362960}';
Linking.openURL(url).then((data) => {
console.log('open whatsapp', data)
}).catch(() => {
console.log('App not installed')
});
}} >
<Icon name='logo-whatsapp' style={{color: '#395894', fontSize: 30, marginRight: 10}}/>
</TouchableOpacity>
let url = 'twitter://send?text=hello this is checked'
我如何为其他社交媒体平台做到这一点?
【问题讨论】:
-
你试过this吗?为什么你认为twitter有
/send页面?
标签: javascript reactjs react-native