如何从标记照片获取朋友uid?

时间:2011-11-15 11:55:34

标签: facebook facebook-fql

我可以从表“照片”的字段“文本”中获取名称但是 我不能用这些名字来获取uids。

如何在照片中获取被标记人物的uid?

1 个答案:

答案 0 :(得分:0)

你所要做的就是像这样查询图形api:

https://graph.facebook.com/{photo_id}

您将收到所需的数据......

{
"id": "{photo_id}", 
"from": {
   "name": "{user_that_uploaded_the_photo}", 
   "id": "123"
}, 
"tags": {
"data": [
  {
    "id": "123", 
    "name": "Lior", 
    "x": 48.5099, 
    "y": 37.5276, 
    "created_time": "2011-10-11T05:50:35+0000"
  }, 
  {
    "id": "456", 
    "name": "Shlain", 
    "x": 19.0397, 
    "y": 35.3201, 
    "created_time": "2011-10-11T05:50:40+0000"
  }, 
  {
    "id": "789", 
    "name": "Abigail", 
    "x": 76.8212, 
    "y": 47.4614, 
    "created_time": "2011-10-11T05:50:32+0000"
  }
 ...

您可以使用graph api explorer来试验这些方法......
祝你好运!