簡體   English   中英

如何在Facebook照片上標記人物?

[英]How to tag people on facebook photos?

我們開發了一個應用程序,該應用程序創建了一個包含五個朋友的jpg圖像。 我們需要該應用為照片中的人物添加標簽,但無法正常工作。 該代碼似乎有效,因為我們沒有任何錯誤。

var tagdata= new Array;

tag1['tag_uid'] =Lamigos[0];
tag1['x'] =41;
tag1['y'] =373;

tag2['tag_uid'] =Lamigos[1];
tag2['x'] =172;
tag2['y'] =373;

tag3['tag_uid'] =Lamigos[2];
tag3['x'] =302;
tag3['y'] =373;

tag4['tag_uid'] =Lamigos[3];
tag4['x'] =100;
tag4['y'] =436;

tag5['tag_uid'] =Lamigos[4];
tag5['x'] =100;
tag5['y'] =567;


tag['data']=tagdata;
tagdata[0]=tag1;
tagdata[1]=tag2;
tagdata[2]=tag3;
tagdata[3]=tag4;
tagdata[4]=tag5;


   FB.api('/me/photos', 'post', {
    message:'Ahora puedes...',
    url:"http://www.xxxxxxx.com"+imgfin,
    tags:tag
   }, function(response){

      if (!response || response.error) {
        alert('Error al compartir tu lista');
      } else {
        vercapas(6);
  document.getElementById("simgfin").src=imgfin;
  document.getElementById("botcompartir").innerHTML="<a name='fb_share' type='button_count' href='http://www.facebook.com/sharer.php?u=http://www.xxxxxxxx.com" + imgfin + "&t=Estos son mis patas más patas'>Compartir</a>";
      }
   }); 

在發布到/ me / photos時, https://developers.facebook.com/docs/reference/api/user/#photos沒有說tags參數被接受。

我猜您發布照片必須添加標簽-參見此處: https//developers.facebook.com/docs/reference/api/photo/#tags

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM