照片中标记朋友的多个 uid 不起作用。下面的代码仅适用于单个用户..我将数组中的三个 uid 传递给 foreach 后,我将它们传递给了 facebook graph api..如何使用 graph api ( $argstag
) 在 facebook 中标记这 3 个 uid。任何人都可以帮助我......任何帮助都是appericiated..在此先感谢
$friends_tag_array[]=array('uid'=>'1472898480','x'=>'40','y'=>'40');
$friends_tag_array[]=array('uid'=>'100002109469765','x'=>'40','y'=>'40');
$friends_tag_array[]=array('uid'=>'561260191','x'=>'40','y'=>'40');
//echo '<pre>'; print_r($jsonfrnd); echo '</pre>'; die();
for($i=0;$i<count($friends_tag_array);$i++)
{
foreach($friends_tag_array as $value)
{
//print_r($value); die();
$friend = $value['uid'];
//$frndId = $friends_tag_array[$i]['uid'];
$argstag = array('to'=>$friend);
$argstag['x'] = '40';
$argstag['y'] = '40';
}
}
try
{
$res = $facebook->api('/'.$json->id.'/tags', 'POST', $argstag);
} catch (FacebookApiException $e) {
Mage::getSingleton('core/session')->addError($post_process_view->render(POST_PROCESS_TEMPLATES,'post_process-error.phtml'));
}