不可能facebook允许我们从我的应用发布或共享图像到用户墙,然后同时用户图像将存储在我的粉丝专辑中?
建议和意见怎么做?希望你能为我提供一些代码
步骤1
$user = $facebook->getUser();
$loginUrl = $facebook->getLoginUrl(
array(
'scope' => 'email,publish_stream,user_birthday,user_location,user_work_history,user_about_me,user_hometown,user_photos'
)
);
step2,4,5
$file='images/'.$_FILES["file"]['name'];
if( move_uploaded_file($_FILES["file"]["tmp_name"],$file))
{
$facebook->setFileUploadSupport(true);
$post_data = array(
'name'=>$_POST['album'],
'description'=>$_POST['album']
);
$data['album'] = $facebook->api("/me/albums", 'post', $post_data);
//$file = $file_name;
$post_data = array(
"message" => $_POST['message'],
"source" => '@' . realpath($file)
);
$album_id = $data['album']['id'];
$data['photo'] = $facebook->api("/$album_id/photos", 'post', $post_data);
}
答案 0 :(得分:0)
有可能......步骤