【问题标题】:IOS image sharing to WhatsApp not workingIOS图像共享到WhatsApp不起作用
【发布时间】:2017-01-01 00:00:56
【问题描述】:

我正在 Ionic Framework 中构建一个应用程序,您可以在其中将图片发布到提要,然后将它们分享到社交媒体。我使用 Cordova 插件 SocialSharing。在 Android 上,将图片分享到 WhatsApp 可以正常工作。在 iPhone 上,它只与图像共享文本,而不是图像本身。分享到 Facebook(例如)在两种设备上都可以正常工作。

知道为什么它不能在 iPhone 上的 WhatsApp 中运行吗?

这是 controllers.js 中的代码:

$scope.shareImage = function (item) {
    $cordovaSocialSharing
        .share(item.note.text, null, item.image, null)
        .then(function (result) {
        }, function (err) {
           console.log(err);
        });
};

以及视图中的 HTML:

<div class="share-image" ng-click="shareImage(item)">
    Share this picture
</div>

【问题讨论】:

    标签: ios cordova ionic-framework whatsapp sharing


    【解决方案1】:

    我在我的一个项目中使用了这种和平的代码(我对其进行了修改以使用与您的相同的变量):

    你的看法

    <div class="share-image" ng-click="shareImage(item)">
        Share this picture
    </div>
    

    你的控制器

    $scope.shareImage = function(item){
        window.plugins.socialsharing.share(null, null, 'item.image', null)"
    };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-23
      • 1970-01-01
      • 2012-12-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多