【问题标题】:Ionic 2 Native Social Share errorIonic 2 Native Social Share 错误
【发布时间】:2017-04-20 13:12:07
【问题描述】:

您好,我正在尝试为我的 Ionic 2 应用程序设置本地 Twitter 共享。我已经正确安装了cordova插件,将它们包含在我的应用程序模块中,我正在使用的页面组件,我的电子邮件共享功能工作正常,表明cordova和社交共享设置正确。但是,当我尝试使用社交分享 twitter 时

 this.socialSharing.shareViaTwitter("this is the message", "assets/images/port.jpg","https://futuresync.co.uk").then(()=>{
      //Sharing twitter successful
      console.log("Twitter share success");
    }).catch((error)=>{
      //Sharing twitter unsuccessful
      console.log("Twitter sharing unsuccessful");
      console.log(error);
    });

我收到this 错误。

例外:未捕获(承诺):com.google.android.apps.maps,com.google.android.apps.messaging

任何帮助都会很棒:)

【问题讨论】:

  • 它在浏览器上不起作用。在实际的 android 设备上对其进行测试,它应该可以正常工作(假设其他一切正常)。
  • 检查你的设备上是否安装了twitter应用

标签: android cordova ionic2


【解决方案1】:

它不适用于浏览器。在使用 ionic build android 构建 apk 后在实际的 android 设备上对其进行测试,它应该可以正常工作(假设其他一切正常)。

另外,检查 AndroidManifest.xml 和 config.xml 中的权限和设置是否正确。像AndroidManifest.xml-

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

检查这些东西here。

【讨论】:

    猜你喜欢
    • 2017-07-16
    • 2020-01-05
    • 1970-01-01
    • 1970-01-01
    • 2017-08-26
    • 2018-01-01
    • 2017-06-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多