I\'m having a strange problem with the graph API, the below code used to work for me adding a post to a users news feed with a thumbnail of the attached photo (referenced in
I think the 'object_attachment'=>$photo_id
won't work any more.
You should change it to 'picture'=>$photo_url
$photo_Url = "link to your photo";//Valid Facebook Photo ID...
$facebook = new Facebook($config);
$attachment = array(
'access_token' => $user_token,
'message' => "Test Message",
'caption' => "THis is a Caption",
'name' => "Test Name",
'description' => "This is a description",
'link' => 'http://url.com/',
'picture' => $photo_Url,
);
$response = $facebook->api("/".$userID."/feed/", 'POST', $attachment);
You can find more Here