I can use the API to post to my facebook following the example at Simple example to post to a Facebook fan page via PHP?, as below
$data['picture'] = $image_URL;
$data['link'] = $link_URL;
$data['message'] = $message_TEXT;
$data['caption'] = $caption_TEXT;
$data['description'] = $description_TEXT;
$data['access_token'] = $page_access_token;
$post_url = 'https://graph.facebook.com/'.$page_id.'/feed';
try{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($ch);
curl_close($ch);
}catch (Exception $e) {
echo 'ERROR '.$e.' in CURL for Facebook posting';
}
Is it possible to do something similar to share a post, if we know the URL of the post (e.g. https://www.facebook.com/TED/posts/10159368542595652)