0

How to share a image on facebook on button click?

i used their opengraph api. but seems not working. Can anyone share working sample

FB.ui({
  method: 'share_open_graph',=
  action_type: 'og.likes',
  action_properties: JSON.stringify({
    object: {
    'og:url': 'https://www.example.com',
    'og:title': 'This is an example',
    'og:description': 'This is an example',
    'og:image': 'https://www.example.com/xxx.jpg'
    }
  })
 },
function (response) {
// Action after response
});

this is the error: https://i.stack.imgur.com/9ThJI.jpg

0 Answers0