I am trying to upload an image through my application with Facebook Graph API to an album of my fan page. Although I provide the albumID like a parameter for uploading the image, it is uploaded in an album named APPLICATION_NAME Photos on my own profile. The album of the fan page stays empty. I tried also with sending the pageID of my fan page instead of albumID, but the result is the same. The code I use for the upload is:
$fb_pfoto = $facebook->api('/' . $albumID . '/photos','POST',array(
'access_token' => $session['access_token'],
'message' => 'Caption',
'source' => '@' . realpath( '/path/to/image.jpg' )
));
Please give me ideas how can I upload the image to the fan page and not to my own profile album.