$pid = $uid.'_'.$pid;
$access_token = $session['access_token'];
$tag0 = array('tag_uid'=>$fd0,'x'=>'30.0','y'=>'85.0');
$tag1 = array('tag_uid'=>$fd1,'x'=>'35.0','y'=>'85.0');
$tag2 = array('tag_uid'=>$fd2,'x'=>'40.0','y'=>'85.0');
$tag3 = array('tag_uid'=>$fd3,'x'=>'45.0','y'=>'85.0');
$tag4 = array('tag_uid'=>$fd4,'x'=>'55.0','y'=>'85.0');
$tag5 = array('tag_uid'=>$fd5,'x'=>'60.0','y'=>'85.0');
$tag6 = array('tag_uid'=>$fd6,'x'=>'65.0','y'=>'85.0');
$tag7 = array('tag_uid'=>$fd7,'x'=>'70.0','y'=>'85.0');
$tags = array($tag0,$tag1,$tag2,$tag3,$tag4,$tag5,$tag6,$tag7);
$facebook->api(array('method'=>'photos.addTag','pid'=>$pid,'tags'=>json_encode($tags)));
However, in the new facebook policy, they do not seem to prefer applications to automatically tag people in photos.
http://developers.facebook.com/docs/guides/policy/examples_and_explanations/photos/
source
share