首页 文章

我在离子3中使用socialSharing插件时崩溃了

提问于
浏览
0

我使用ionic 3和SocialSharing插件使用时效果很好:

socialSharing.shareViaWhatsApp

whats(){

    //this.socialSharing.shareViaWhatsApp("I needed a "+this.message,null,null)
this.socialSharing.shareViaWhatsApp("اI NEED "+this.message, null, null)
.then(() => console.log('ok'))
.catch(() => console.log('not ok'));


    }

但应用程序崩溃并关闭使用:

shareViaWhatsAppToReceiver

whats(){
    //this.socialSharing.shareViaSMS("I needed a "+this.message,"+249922222343")
this.socialSharing.shareViaWhatsAppToReceiver("00249922222343", "I needed a "+this.message, null, null)
    .then(() => console.log('ok'))
.catch(() => console.log('not ok'));

}

离子信息:

$ ionic info

cli包:(C:\ Users \ abdo \ AppData \ Roaming \ npm \ node_modules)@ ionic / cli-utils:1.19.1 ionic(Ionic CLI):3.19.1全局包:cordova(Cordova CLI):7.1 . 0本地软件包:@ ionic / app-scripts:3.1.8 Cordova平台:android 6.3.0 Ionic Framework:ionic-angular 3.9.2系统:节点:v8.9.3 npm:5.5.1操作系统:Windows 7

Please help me

1 回答

  • 0

    国家钥匙必须在那里 . 00将无法正常工作,必须签名后跟国家/地区密钥,然后编号为310433885282 . 00310433885282将无效 . 请注意,在Android上,您只能将“文本”和“网址”直接发送给某人,因此会忽略文件 .

    By phone number (since 5.3.0)

    <button onclick="window.plugins.socialsharing.shareViaWhatsAppToPhone('+31611111111', 'Message via WhatsApp', null /* img */, null /* url */, function() {console.log('share ok')})">msg via WhatsApp to phone number +31611111111</button>
    

    By abid (iOS) or phone number (Android)

    <button onclick="window.plugins.socialsharing.shareViaWhatsAppToReceiver('101', 'Message via WhatsApp', null /* img */, null /* url */, function() {console.log('share ok')})">msg via WhatsApp for Addressbook ID 101</button>
    

相关问题