2014-10-07 25 views

回答

1

我正在通過圖API訪問/me節點。

我發現,但要獲得age_range,我需要發出以下API調用

me?fields=age_range 

這讓我有最大值和最小值一個JSON obejct AGE_RANGE的AGE_RANGE不與根對象返回。

0

您必須明確告訴API您需要age_range作爲公共配置文件的一部分(不需要特殊權限)。用戶的年齡範圍可能是13-17,18-20或21+。

/* make the API call v.2.3 */ 
FB.api(
    "/me?fields=age_range", 
    function (response) { 
     if (response && !response.error) { 
     /* handle the result */ 
     } 
    } 
); 

閱讀文檔https://developers.facebook.com/docs/graph-api/reference/age-range/