I have a problem with Facebook API. I want to share some information (url, image, description) on facebook from a website. But I want to see a large image in the preview dialog. I use 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) {});
How can I change it?
Try using the 'share' method instead of 'share_open_graph', like this:
FB.ui({
method: 'share',
href: 'https://developers.facebook.com/docs/',
}, function(response){});
Source: https://developers.facebook.com/docs/sharing/reference/share-dialog/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.