I am developing my first facebook app, which includes creating a new album and posting photos to the user wall.
By learning through facebook documentation and few tutorial and came up this code, but I am getting following error with it.
Fatal error: Call to a member function setFileUploadSupport() on a non-object …
$facebook -> setFileUploadSupport(true);
$album_details = array('message' => 'Album desc', 'name' => 'Album name');
$create_album = $facebook -> api('/me/albums', 'post', $album_details);
$album_uid = $create_album['id'];
$photo_details = array('message' => 'Photo message');
$file = 'app.jpg';
$photo_details['image'] = '@' . realpath($file);
$upload_photo = $facebook -> api('/' . $album_uid . '/photos', 'post', $photo_details);
Kindly help me with this. thankyou