我有Facebook API的问题。我想在网站上分享Facebook上的一些信息(网址,图片,描述)。但我想在预览对话框中看到一个大图像。我用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) {});
我该怎么改变它?
尝试使用'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/