对于大多数,如果不是全部的Facebook API对象洞察调用,我都会得到一个空数据数组的响应。在登录时,我请求以下权限:read_insights,publish_pages,manage_pages。
我正在尝试进行一些请求,包括:page_views_total,page_impressions,page_fans。
FB.api(
"/1493689654199431/insights/page_impressions/lifetime",
function (response) {
if (response && !response.error) {
console.log(response);
}
}
);
响应示例:
{
"data": [
],
"paging": {
"previous": "https://graph.facebook.com/v2.6/1493689654199431/insights/page_impressions/lifetime?access_token=EAACEdEose0cBAGNO4tT95osm9KIaLlsoxoWPyk7g4J6m3iBwa5ZArxGEZBbeIpILExuTZAC6KFRHfCuccbsOCCQLmRZCItZAAmTs3PXzueCCJ0CVjr6UBB3gZCfClQeeI1PbHZCnJVqZBPHf00Vl6U4Lj6B1FpMhZAqUSdXNvcPDWlAZDZD&debug=all&format=json&method=get&pretty=0&suppress_http_code=1&since=1462194002&until=1462453202",
"next": "https://graph.facebook.com/v2.6/1493689654199431/insights/page_impressions/lifetime?access_token=EAACEdEose0cBAGNO4tT95osm9KIaLlsoxoWPyk7g4J6m3iBwa5ZArxGEZBbeIpILExuTZAC6KFRHfCuccbsOCCQLmRZCItZAAmTs3PXzueCCJ0CVjr6UBB3gZCfClQeeI1PbHZCnJVqZBPHf00Vl6U4Lj6B1FpMhZAqUSdXNvcPDWlAZDZD&debug=all&format=json&method=get&pretty=0&suppress_http_code=1&since=1462712402&until=1462971602"
}
}