2016-08-24 84 views
2

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

任何想法为什么它不适用于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> 

回答

0

我用这个代码和平我的项目之一(我修改了它使用相同的变量为你的):

您的看法

<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)" 
};