2013-07-01 99 views
1

我在查詢Facebook對象上的公共信息。我收到來自Facebook的稍微不同的JSON響應,具體取決於是否使用應用程序令牌或由圖形瀏覽器生成的令牌進行查詢。基於身份驗證令牌的不同Facebook數據響應

查詢是請求以下URL,並用兩個不同的訪問令牌查詢時在URL https://graph.facebook.com/205732386217368?access_token=

下面使用適當的訪問令牌的例子迴應一樣簡單。主要的不同在於場地數據。

響應隨圖形瀏覽器訪問令牌

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

該事件的場地有用戶限制。

使用Facebook的探險家,你有你自己的用戶背景和你超過21或者在正確的位置等

用戶限制DOCO可以在這裏看到https://developers.facebook.com/docs/opengraph/howtos/user-restrictions/

我如何檢查它是使用瀏覽器,我沒有登錄Facebook並轉到相關頁面www.facebook.com/203514029694703(您的場地),您將看到沒有用戶上下文的頁面。如果您嘗試在登錄時查看同一頁面,您將能夠像在FB Explorer中一樣查看它。

相關問題