Sharing Facebook in SPA

Asked

Viewed 14 times

1

Good afternoon.

I’m having trouble sharing a post on a SPA site. I’m using the following code for such:

FB.ui({
method: 'share_open_graph',
action_type: 'og.shares',
action_properties: JSON.stringify({
    object : {
       'og:url': 'url para acesso', 
       'og:title': 'titulo',
       'og:description': 'descricao',
       'og:image': 'imagem do post'
    }
})
},
// callback
function(response) {});

The problem is when I share a specific post, the script is not searching for the image passed as parameter (in action_properties) but the image that is specified in the main html meta tag.

Does anyone have any idea how to solve this problem, because the idea is to send the image of the selected post to the share (There may be several posts on the same page).

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.