//Create an album
$album_details = array(
'message'=> 'How will you die?',
'name'=> 'How will you die?'
);
$create_album = $facebook->api('/me/albums', 'post', $album_details);
//Get album ID of the album you've just created
$album_uid = $create_album['id'];
//Upload a photo to album of ID...
$file='img/'.$fbid.'.jpg'; //Example image file
$photo_details = array( 'message'=> 'Find...51', 'image' => '@'.realpath($file));
if ($session) {
// We have a valid FB session, so we can use 'me'
$upload_photo = $facebook->api('/me/photos', 'post', $photo_details);
} elseif( isset($_SESSION['user_id']) ) {
$upload_photo = $facebook->api("/{$_SESSION['user_id']}/photos", 'post', $photo_details);
}
$upphoto = $upload_photo['id'];
ImageDestroy( $canvas );
header("Location: http://www.facebook.com".$fbid."&photoid=".$upphoto."")
我创建了一个上传照片用户墙的 facebook 应用程序。
但我反复收到上述错误。我猜/
上面的代码中某处缺少'',但我不知道在哪里放置' /
'。如果发现任何其他错误,请帮助我完成此代码并使其正常工作。
谢谢你 !