【问题标题】:Facebook graph API, access location tags in photos and postsFacebook 图形 API,访问照片和帖子中的位置标签
【发布时间】:2011-11-19 20:25:10
【问题描述】:

在照片和帖子中,我经常看到位置标签指向代表某个地点的 Facebook 页面。它们通常以 "near" 、 "at" 或 "in" 开头。有人知道通过图形 API 或任何其他方式访问这些数据的方法吗?

这是一个例子: 网页,我把照片公开给大家看http://www.facebook.com/photo.php?pid=11671735&id=506482094 api 调用https://graph.facebook.com/10150601497547095?access_token=*

{
   "id": "10150601497547095",
   "from": {
      "name": "Edouard Tabet",
      "id": "506482094"
   },
   "name": "Alcohol grows on trees in Isabela, Galapagos",
   "picture": "http://photos-a.ak.fbcdn.net/hphotos-ak-snc7/381095_10150601497547095_506482094_11671735_110244218_s.jpg",
   "source": "http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s720x720/381095_10150601497547095_506482094_11671735_110244218_n.jpg",
   "height": 720,
   "width": 479,
   "images": [
      {
         "height": 2048,
         "width": 1365,
         "source": "http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/329294_10150601497547095_506482094_11671735_110244218_o.jpg"
      },
      {
         "height": 720,
         "width": 479,
         "source": "http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s720x720/381095_10150601497547095_506482094_11671735_110244218_n.jpg"
      },
      {
         "height": 270,
         "width": 180,
         "source": "http://photos-a.ak.fbcdn.net/hphotos-ak-snc7/381095_10150601497547095_506482094_11671735_110244218_a.jpg"
      },
      {
         "height": 130,
         "width": 86,
         "source": "http://photos-a.ak.fbcdn.net/hphotos-ak-snc7/381095_10150601497547095_506482094_11671735_110244218_s.jpg"
      },
      {
         "height": 112,
         "width": 75,
         "source": "http://photos-a.ak.fbcdn.net/hphotos-ak-snc7/381095_10150601497547095_506482094_11671735_110244218_t.jpg"
      }
   ],
   "link": "http://www.facebook.com/photo.php?pid=11671735&id=506482094",
   "icon": "http://static.ak.fbcdn.net/rsrc.php/v1/yz/r/StEh3RhPvjk.gif",
   "created_time": "2012-01-16T23:34:54+0000",
   "position": 1,
   "updated_time": "2012-01-21T02:16:55+0000",
   "comments": {
      "data": [
         {
            "id": "10150601497547095_7207114",
            "from": {
               "name": "Tom LeNoble",
               "id": "218686"
            },
            "message": "hope you are having fun!",
            "can_remove": true,
            "created_time": "2012-01-16T23:36:33+0000"
         },
         {
            "id": "10150601497547095_7207963",
            "from": {
               "name": "Sol McKinney",
               "id": "1021642751"
            },
            "message": "How come Darwin didn't write about that?!",
            "can_remove": true,
            "created_time": "2012-01-17T01:31:39+0000"
         },
         {
            "id": "10150601497547095_7212820",
            "from": {
               "name": "Romain BL",
               "id": "556337447"
            },
            "message": "Des bisous mr Tabet! J'esp\u00e8re que tu vas bien depuis tout ce temps!",
            "can_remove": true,
            "created_time": "2012-01-17T18:19:13+0000"
         }
      ],
      "paging": {
         "next": "https://graph.facebook.com/10150601497547095/comments?access_token="
      }
   },
   "likes": {
      "data": [
         {
            "id": "1404245",
            "name": "Hannah Russin"
         },
         {
            "id": "1278210658",
            "name": "Seth Long"
         },
         {
            "id": "218686",
            "name": "Tom LeNoble"
         }
      ],
      "paging": {
         "next": "https://graph.facebook.com/10150601497547095/likes?access_token=&limit=25&offset=25&__after_id=218686"
      }
   }
}

【问题讨论】:

  • 我也是两天前asked this。我还没到任何地方。

标签: facebook-graph-api geolocation location


【解决方案1】:

我想通了...当访问带有“照片 ID”的照片时,结果中不存在地点属性...通过其“帖子 ID”访问同一张照片时,地点属性出现在GRAPH API 调用的 JSON 结果。不是很方便……

【讨论】:

    【解决方案2】:

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-19
    相关资源
    最近更新 更多