I am trying to upload a photo using a facebook app. The code is
$fname = FULL_PATH_TO_FILE."/home_bg.jpg";
$attachment = array(
'access_token' => $facebook->getAccessToken(),
'name' => '',
'description' => '',
'start_time' => '',
'link' => '',
'source'=> '@'.$fname
/*...*/
);
/*Send the data*/
$data = $facebook->api('/'.$social_id.'/photos', 'post', $attachment);
The application has a scope of: offline_access,read_stream,publish_stream,user_about_me,manage_pages
Is there something I am missing? Using the same credentials I can post to my wall without a problem.
Thanks for your time.