1

我正在查询 Facebook 对象上可用的公共信息。我从 Facebook 收到的 JSON 响应略有不同,具体取决于我是使用应用程序令牌还是图形浏览器生成的令牌进行查询。

查询就像请求以下 URL 并在 URL https://graph.facebook.com/205732386217368?access_token=中使用适当的访问令牌一样简单

以下是使用两个不同访问令牌进行查询时的示例响应。主要区别在于场地数据。

使用 Graph Explorer 访问令牌的响应

{
   "id": "205732386217368",
   "owner": {
      "category": "Non-profit organization",
      "name": "Australian Pain Management Association",
      "id": "223536391023779"
   },
   "name": "APMA Pain Support Group: Brisbane South",
   "description": "Second Tuesday of every month\n\nWe offer support, friendship, information, presentations and guest speakers. The groups are for everyone in the community living with pain (and their family members) and are FREE for APMA members. Non-members are asked to donate a gold coin at each meeting. \n\nThe purpose of the group is to offer positive support and encouragement, with a focus on the self-management of persistent pain.\n\nFor more information, contact Annette at 07 3359 2275 or Annette.ssr\u0040hotmail.com ",
   "start_time": "2013-08-13T10:30:00+1000",
   "end_time": "2013-08-13T12:00:00+1000",
   "timezone": "Australia/Brisbane",
   "is_date_only": false,
   "location": "Coorparoo RSL and Community Club",
   "venue": {
      "latitude": -27.494904155853,
      "longitude": 153.05662292452,
      "city": "Brisbane",
      "state": "QLD",
      "country": "Australia",
      "id": "203514029694703",
      "street": "45 Holdsworth Street, Coorparoo",
      "zip": "4151"
   },
   "privacy": "OPEN",
   "updated_time": "2013-06-25T01:43:27+0000"
}

使用应用程序访问令牌响应

{
   "id": "205732386217368",
   "owner": {
      "category": "Non-profit organization",
      "name": "Australian Pain Management Association",
      "id": "223536391023779"
   },
   "name": "APMA Pain Support Group: Brisbane South",
   "description": "Second Tuesday of every month\n\nWe offer support, friendship, information, presentations and guest speakers. The groups are for everyone in the community living with pain (and their family members) and are FREE for APMA members. Non-members are asked to donate a gold coin at each meeting. \n\nThe purpose of the group is to offer positive support and encouragement, with a focus on the self-management of persistent pain.\n\nFor more information, contact Annette at 07 3359 2275 or Annette.ssr\u0040hotmail.com ",
   "start_time": "2013-08-12T17:30:00",
   "end_time": "2013-08-12T19:00:00",
   "timezone": "Australia/Brisbane",
   "is_date_only": false,
   "location": "Coorparoo RSL and Community Club",
   "venue": {
      "name": "Coorparoo RSL and Community Club"
   },
   "privacy": "OPEN",
   "updated_time": "2013-06-25T01:43:27+0000"
}

有谁知道为什么这两个响应不同,以及如何使用我的应用程序令牌来接收与图形浏览器相同的响应?

4

1 回答 1

1

该活动的场地有用户限制。

使用 Facebook 资源管理器,您拥有自己的用户上下文,并且您已超过 21 岁或在正确的位置等

用户限制文档可以在这里看到https://developers.facebook.com/docs/opengraph/howtos/user-restrictions/

我如何检查它是使用我未登录 facebook 的浏览器并转到相关页面 www.facebook.com/203514029694703(您的地点),您将在没有用户上下文的情况下看到您无法看到该页面。如果您尝试在登录后查看同一页面,您将能够像在 FB Explorer 中一样看到它。

于 2013-07-01T04:25:47.113 回答