直到今天,我的 Facebook 照片标签应用程序都运行良好。我使用以下代码在照片中标记朋友。
$attachment = array(
'message' => $mes,
'tags' =>
array(
array(
'tag_uid'=> $re[0],
'x' => '30',
'y' => '60',
),
array(
'tag_uid'=> $re[1],
'x' => '30',
'y' => '50',
),
array(
'tag_uid'=> $re[2],
'x' => '30',
'y' => '70',
),
array(
'tag_uid'=> $re[3],
'x' => '30',
'y' => '10',
),
array(
'tag_uid'=> $re[4],
'x' => '10',
'y' => '60',
),
array(
'tag_uid'=> $re[5],
'x' => '40',
'y' => '60',
),
array(
'tag_uid'=> $re[6],
'x' => '50',
'y' => '60',
),
array(
'tag_uid'=> $re[7],
'x' => '60',
'y' => '60',
),
array(
'tag_uid' => $re[8],
'x' => '80',
'y' => '60',
)
)
);
$facebook->setFileUploadSupport(true);
$attachment['image'] ='@'.realpath($filename);
$photo = $facebook->api('/'.$aid.'/photos', 'POST', $attachment);
但此代码不再标记朋友。它只是上传照片。facebook 中是否有任何 API 更改或任何替代工作方法来标记朋友。谢谢。