基于身份验证令牌响应的不同Facebook数据

时间:2013-07-01 03:54:10

标签: facebook facebook-graph-api

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

查询就像请求以下网址并使用网址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"
}

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

1 个答案:

答案 0 :(得分:1)

该活动的举办地有用户限制。

使用Facebook资源管理器,您拥有自己的用户环境,而且您已超过21岁或位于正确的位置等

此处可以看到用户限制doco https://developers.facebook.com/docs/opengraph/howtos/user-restrictions/

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