我正在使用FB.ui()来分享一个页面,在移动设备上,og图像被裁剪成正方形,而不是完全被播放。我的对数图像的自然大小为1200x622。如何使用FB.ui方法指定其尺寸?
下面是我使用的代码:
FB.ui({
method: 'share',
action_type: 'og.shares',
href: 'http://example.com/',
title: 'My title',
picture: 'http://example.com/picture.jpg',
description: 'My description'
}, function(response){
console.log(response);
});谢谢你,安德鲁
发布于 2016-02-07 16:56:35
您不能在共享对话框中更改共享图像,您需要使用提要对话框进行更改:https://developers.facebook.com/docs/sharing/reference/feed-dialog/
如果你想使用分享对话框,请确保在分享后按照指导原则获得最佳图片:https://developers.facebook.com/docs/sharing/best-practices#images
此外,您还应该在HTML代码中直接包含大小:
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />来源:http://ogp.me/
如果所有这些对你都不起作用,你可以提交一个bug:https://developers.facebook.com/bugs/
https://stackoverflow.com/questions/35248645
复制相似问题