【发布时间】:2018-06-15 07:51:06
【问题描述】:
我正在尝试使用此插件在微信和 WhatsApp 中分享图像:EddyVerbruggen/SocialSharing-PhoneGap-Plugin
window.plugins.socialsharing.shareVia('whatsapp','msg',null,
'images/hello.png' , null /* url */, function(e) {
console.log('share' +e)
}, function(errormsg){
alert(errormsg)
})
window.plugins.socialsharing.shareVia('com.tencent.mm','msg',null,
'images/hello.png' , null /* url */, function(e) {
console.log('share' +e)
}, function(errormsg){
alert(errormsg)
})
我的应用在 ios 中崩溃,但在 android 中运行正常。
通过使用另一种方法shareViaWhatsapp:
window.plugins.socialsharing.shareViaWhatsApp('Message via WhatsApp'
,'images/hello.png', function() {
console.log('share ok')
}, function(errormsg){
alert(errormsg)
})
此方法在 android 中有效,但在 ios 中显示当我共享图像时要共享的所有应用程序,如果我只共享消息它在 ios 中正常工作。请指导我。
【问题讨论】:
标签: android ios cordova cordova-plugins