我想将用户的朋友标记为用户从我的应用程序上传的照片....任何人都请帮助我...我会非常感谢....我使用codeigniter作为一个框架...... 我已经在用户的个人资料中创建了一个相册,并将该照片上传到了该相册中,但现在我要标记从朋友列表中提取的朋友...
这是我用于创建相册和上传照片的代码=>
$fb_config = array(
'appId' => '148056051963323',
'secret' => '0cebf087b3084e5a772b6c31acb2736a'
);
$this->load->library('facebook', $fb_config);
$this->facebook->setFileUploadSupport(true);
$album_details = array(
'message'=> 'For more LoL images check out -> http://lolsharing.com/',
'name'=> 'LoL Sharing'
);
$album_exist_check = $this->common_model->check_album($_SESSION['user_fb_id']);
if($album_exist_check['album_id']==0)
{
$create_album = $this->facebook->api('/me/albums', 'post', $album_details);
$insert_ablum = $this->common_model->insert_ablum($_SESSION['user_fb_id'], $create_album['id']);
}
else
{
$create_album['id'] = $album_exist_check['album_id'];
}
$photo_details = array(
'message'=> ''.$image_name['image_caption'].' for more LoL Images check out - http://lolsharing.com/'
);
$photo_details['image'] = '@' . realpath(''.FCPATH.'assets/joke_images/'.$image_name['image_name'].'');
$upload_photo = $this->facebook->api('/'.$create_album['id'].'/photos', 'post', $photo_details);
if($upload_photo)
{
$this->common_model->user_point_counter($image_id);
$this->common_model->user_self_point_counter();
if($upload_photo)
{
//redirect(''.$_SESSION['return_url'].'');
echo "<div class='button1'>Image Shared.</div>";
echo '<div class="num_share">
Total Shares <br />
<span> '.$image_name['shares'].'</span>
</div>';
}
}
请帮助我......提前谢谢
答案 0 :(得分:2)
以下是添加标签的方法。我给出的示例是使用Graph API Explorer:https://developers.facebook.com/tools/explorer
另请参阅:https://developers.facebook.com/docs/reference/api/photo/
的tags
部分