//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."")
I have created a facebook application which uploads photo users wall.
But repeatedly i am getting the above error. I guess that ‘/‘ is missing somewhere in the above piece of code, But i don’t know where to put ‘/‘. If any other mistakes are caught then please help me in making this code complete and working.
Thank You !
Change
to