Possible Duplicate:
Posting Photo to facebook fan page via iOS app by regular non-admin users
Facebook PHP SDK app to upload photo to page
i am using the following code to post a pic to my fan page for which i have manage_pages permissions , but it posts to my own timeline instead of my fan page when i try to post photos , but it works well when i try to post just text !
$fb = new Facebook(array(
'appId' => $appID,
'secret' => $appSecret,
'cookie' => true,
'fileUpload' => true
));
$comic_info = get_records('comics',1,0,'main_pic,title','id DESC','sent=0');
$photo = '../../uploads/pics/'.$comic_info[0]['main_pic']; // Path to the photo on the local filesystem
$fb->setAccessToken('AAAFw2ez8BtQBANifSkVR9WvZBfVsuhHZCtiZCtOaJ9OaXeANHLBpc7hJuEWFuQSZBWZCvpiuFGWE7my396OFd3KbkrkyW8Pu8ndPx4tFBBAZDZD');
$postResult = $fb->api('/150391721775239_35388/photos', 'POST', array(
'source' => '@' . realpath($photo),
'message' => $comic_info[0]['title']
)
);
150391721775239_35388 is the timeline photos album , i also tried to use my page id , but in vain !