1

Facebook オブジェクトで利用可能な公開情報を照会しています。アプリケーション トークンを使用してクエリを実行するか、グラフ エクスプローラーによって生成されたトークンを使用してクエリを実行するかによって、Facebook からわずかに異なる JSON 応答を受け取ります。

クエリは、次の URL を要求し、URL で適切なアクセス トークンを使用するのと同じくらい簡単ですhttps://graph.facebook.com/205732386217368?access_token=

以下は、2 つの異なるアクセス トークンを使用してクエリを実行したときの応答の例です。主な違いは会場データにあります。

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"
}

これら 2 つの応答が異なる理由と、アプリケーション トークンを使用してグラフ エクスプローラーで取得したのと同じ応答を受け取る方法を知っている人はいますか?

4

1 に答える 1

1

そのイベントの会場には利用者制限があります。

Facebook エクスプローラーを使用すると、自分自身のユーザー コンテキストがあり、21 歳以上であるか、適切な場所にいるなどです。

ユーザー制限ドコはこちらhttps://developers.facebook.com/docs/opengraph/howtos/user-restrictions/

それを確認する方法は、Facebook にサインインしていないブラウザーを使用して、関連するページ www.facebook.com/203514029694703 (あなたの場所) に移動すると、ユーザー コンテキストがないとページが表示されないことがわかります。ログインした状態で同じページを見てみると、FB エクスプローラーと同じように見ることができます。

于 2013-07-01T04:25:47.113 に答える