使用Facebook share_open_graph放大图像,可能吗?

时间:2018-09-09 13:09:19

标签: javascript facebook facebook-graph-api facebook-javascript-sdk facebook-share

我对Facebook API有问题。我想从网站上在Facebook上共享一些信息(URL,图像,描述)。但我想在预览对话框中看到大图像。我使用share_open_graph

FB.ui({
method: 'share_open_graph',
action_type: 'share',
action_properties: JSON.stringify({
    object : {
       'og:url': 'https://developers.facebook.com/docs',
       'og:title': 'Facebook Developer Docs',
       'og:description': 'Learn more about our Facebook products through Developer docs. Explore Facebook documentation for AR/VR, Business, Chat, Games, Machine Learning, Monetization, Open Source & Social.',
       'og:image': 'https://static.xx.fbcdn.net/rsrc.php/v3/ye/r/lWB96Z8sFtt.png',
       'og:image:width': '1200', 
       'og:image:height': '630',
       'og:image:type': 'image/jpeg'
    }
})
},function(response) {});

enter image description here

如何更改它?

1 个答案:

答案 0 :(得分:0)

尝试使用“ share”方法代替“ share_open_graph”,如下所示:

FB.ui({
  method: 'share',
  href: 'https://developers.facebook.com/docs/',
}, function(response){});

来源:https://developers.facebook.com/docs/sharing/reference/share-dialog/