- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在使用基本的 Feed 对话来实现在 Facebook 上的共享——标题、标题描述和图像。
正确的图像被拾取并正确显示在桌面、Facebook 的 Android 应用程序和移动网站上。
图像(它是一只手)正在被 iOS 拾取,但它也在被裁剪。
在桌面、Facebook 的 Android 应用程序和移动网站上,正确的图像被拾取并正确显示。 Screenshot - not allowed to post images yet
元标记是 <meta name="og:image" content="/EasysiteWeb/getresource.axd?AssetID=135801">
在页面上:
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<a onclick="postToFeed(); return false;"><img src="/EasysiteWeb/getresource.axd?AssetID=133763" alt="Share on Facebook"/></a>
<p id="msg" style="display: none;"></p>
<script>
//<![!CDATA[
FB.init({appId: "app-id-removed-for-posting-to-SO", status: true, cookie: true});
function postToFeed() {
// calling the API ...
var obj = {
method: "feed",
redirect_uri: "http://www.hospicecareweek.org.uk/countmein",
link: "http://www.hospicecareweek.org.uk/countmein",
picture: 'http://www.hospicecareweek.org.uk/EasysiteWeb/getresource.axd?AssetID=135801',
name: "Hospice Care Week",
caption: "I took the 'Count me in!' pledge for Hospice Care Week",
description: "Take the ‘Count me in!’ pledge and spread the word about why hospice care counts."
};
function callback(response) {
document.getElementById("msg").innerHTML = "Post ID: " + response["post_id"];
}
FB.ui(obj, callback);
}
//]]>
</script>
最佳答案
我们现在遇到了同样的问题。不确定您从哪里获得 1500x1500 作为推荐尺寸。 docs说
The URL of a picture attached to this post. The picture must be at least 50px by 50px (though images larger than 200px by 200px are preferred) and have a maximum aspect ratio of 3:1
我们已经尝试了 90x90 和 200x200,但 iPhone 应用程序仍会对其进行裁剪。不过其他地方都工作正常。
关于ios - Facebook 的 iOS 应用程序 : sharing via feed dialogue using a ‘web app’ results in cropped image,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17469465/
我是一名优秀的程序员,十分优秀!