I want to show the open graph dialog to allow users to write a message before post on their timeline. I'm trying to use the share_open_graph dialog
but for some reason it says that the action is not referencing the object.
I know that there are some questions about it, but it didn't help me. Also, I would like to know why my second code works (I know that not shows the dialog) and why the first one no, and when I find the solution, why this solution.
This is my code using the Facebook open graph dialog:
FB.ui({
method: 'share_open_graph',
action_type: 'alexdecasa:decorate',
action_properties: JSON.stringify({
room: {
"url": image,
"title": "Supply title",
"description": "Supply description",
"image": image
}
})
}, function(response){});
My action is decorate
and the object is room
. As you can see I'm referencing the object inside the action_properties.
Using FB.api
code works:
FB.api(
'me/alexdecasa:decorate',
'post',
{
room: {
"url": image,
"title": "Supply title",
"description": "Supply description",
"image": image
}
},
function(response) {});
Aucun commentaire:
Enregistrer un commentaire