IOS 图像共享到 WhatsApp 不起作用
<p><p>我正在 Ionic 框架中构建一个应用程序,您可以在其中将图片发布到提要,然后将它们分享到社交媒体。我使用 Cordova 插件 SocialSharing。在 Android 上,将图片分享到 WhatsApp 可以正常工作。在 iPhone 上,它只与图像共享文本,而不是图像本身。分享到 Facebook(例如)在两种设备上都可以正常工作。</p>
<p>知道为什么它不能在 iPhone 上的 WhatsApp 中运行吗?</p>
<p>这是 controllers.js 中的代码:</p>
<pre><code>$scope.shareImage = function (item) {
$cordovaSocialSharing
.share(item.note.text, null, item.image, null)
.then(function (result) {
}, function (err) {
console.log(err);
});
};
</code></pre>
<p>以及 View 中的 HTML:</p>
<pre><code><div class="share-image" ng-click="shareImage(item)">
Share this picture
</div>
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我在我的一个项目中使用了这种和平的代码(我对其进行了修改以使用与您的相同的变量):</p>
<p>你的看法</p>
<pre><code><div class="share-image" ng-click="shareImage(item)">
Share this picture
</div>
</code></pre>
<p>你的 Controller </p>
<pre><code>$scope.shareImage = function(item){
window.plugins.socialsharing.share(null, null, 'item.image', null)"
};
</code></pre></p>
<p style="font-size: 20px;">关于IOS 图像共享到 WhatsApp 不起作用,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/39130284/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/39130284/
</a>
</p>
页:
[1]