2016-08-24 77 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)" 
};