2016-11-15 176 views
-1

我在使用某人給我的訪問令牌從facebook圖形api資源管理器獲取數據時遇到了麻煩。Facebook圖形API Api Explorer與Facebook圖形API C#

在開發人員網站的圖形Api瀏覽器中,我可以看到結果給我的查詢,但是當我通過C#或Web Get Request調用它時,數據數組爲空

我檢查的權限兩端(Developers網站和Web Get請求),他們是不同的,但我仍然有被授予讀取兩個見解和廣告。

開發圖形API瀏覽器

{ "data": [ 
    { 
     "permission": "ads_read", 
     "status": "granted" 
    }, 
    { 
     "permission": "read_insights", 
     "status": "granted" 
    }, 
    { 
     "permission": "pages_show_list", 
     "status": "granted" 
    } ] 
} 

網站Get請求

{ 
    "data": [ 
     { 
      "permission": "ads_read", 
      "status": "granted" 
     }, 
     { 
      "permission": "read_insights", 
      "status": "granted" 
     } ] 
} 

我在做什麼錯?這是「pages_show_list」權限的原因,我沒有得到任何關於我的C#Web請求?

回答

0

我已經想清楚是什麼問題。

的問題是,在我的C#代碼,我沒有設置API版本。

此:

https://graph.facebook.com/v2.8/me/insights/page_stories?access_token=xxxx 

此不同:

https://graph.facebook.com/me/insights/page_stories?access_token=xxxx