I am fetching “page_fans” from Facebook Graph API Insights. (..v19.0/pageid/insights/..)
The problem is that the API returns data with values of 1 “randomly?”.
#1: Example response with since/until parameters:
[
{ value: 20698, end_time: '2024-04-29T07:00:00+0000' },
{ value: 1, end_time: '2024-05-01T07:00:00+0000' },
{ value: 1, end_time: '2024-05-02T07:00:00+0000' },
{ value: 1, end_time: '2024-05-03T07:00:00+0000' },
{ value: 1, end_time: '2024-05-04T07:00:00+0000' },
{ value: 1, end_time: '2024-05-05T07:00:00+0000' },
{ value: 1, end_time: '2024-05-06T07:00:00+0000' },
{ value: 20700, end_time: '2024-05-07T07:00:00+0000' },
{ value: 1, end_time: '2024-05-08T07:00:00+0000' },
{ value: 1, end_time: '2024-05-09T07:00:00+0000' },
{ value: 1, end_time: '2024-05-10T07:00:00+0000' },
{ value: 1, end_time: '2024-05-11T07:00:00+0000' },
{ value: 1, end_time: '2024-05-12T07:00:00+0000' }
]
#2: Example response without since/until parameters:
[
{ value: 1, end_time: '2024-05-04T07:00:00+0000' },
{ value: 1, end_time: '2024-05-05T07:00:00+0000' }
]
#3: Example response with only since parameter:
In this response, it seems that the “value: 1” starts at 05.01., then in the case #1 it shows the correct page_fans on 05.07. again.
[
...
{ value: 20702, end_time: '2024-04-23T07:00:00+0000' },
{ value: 20700, end_time: '2024-04-24T07:00:00+0000' },
{ value: 20701, end_time: '2024-04-25T07:00:00+0000' },
{ value: 20700, end_time: '2024-04-26T07:00:00+0000' },
{ value: 20698, end_time: '2024-04-27T07:00:00+0000' },
{ value: 20697, end_time: '2024-04-28T07:00:00+0000' },
{ value: 20698, end_time: '2024-04-29T07:00:00+0000' },
{ value: 1, end_time: '2024-05-01T07:00:00+0000' },
{ value: 1, end_time: '2024-05-02T07:00:00+0000' },
{ value: 1, end_time: '2024-05-03T07:00:00+0000' },
{ value: 1, end_time: '2024-05-04T07:00:00+0000' },
{ value: 1, end_time: '2024-05-05T07:00:00+0000' }
]
On 05.04. [Saturday], this exact fetch was working and I had the correct page_fans value of 20700.
In today’s fetch I’ve got “value: 1” for 05.04., afterwards.
I am courios why is this happening and is there any solution?
Tried to reproduce the problem with other metrics:
page_impressions_unique,page_post_engagement_page_views_total
The values were correct in the response.
Tried Graph API Explorer /w debug=all:
"data": [
{
"name": "page_fans",
"period": "day",
"values": [
{
"value": 20698,
"end_time": "2024-04-29T07:00:00+0000"
},
{
"value": 1,
"end_time": "2024-05-01T07:00:00+0000"
},
{
"value": 1,
"end_time": "2024-05-02T07:00:00+0000"
},
{
"value": 1,
"end_time": "2024-05-03T07:00:00+0000"
},
{
"value": 1,
"end_time": "2024-05-04T07:00:00+0000"
},
{
"value": 1,
"end_time": "2024-05-05T07:00:00+0000"
}
],
....}]
Tried the New Page Experience:
..id/&fields=followers_count,fan_count
The response is correct:
{
"followers_count": 21282,
"fan_count": 20700,
"id": "***"
}
I can’t use this method, because I need to compare values based on dates. The New Page Experience can’t handle since dates.
ekewaka is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.