I use curl php to share link on facebook all is fine and I'VE got this result { "id": "the_link_id" }
. I tried to got the id with:
$result = curl_exec($ch);
$json = json_decode($result);
$post_id = $json->{'id'};
echo $post_id;
but I got this error:
Trying to get property of non-object ...
i found the solution i just added curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);