Reputation: 282
I'm trying to use the Facebook Graph API to get the list of ads for specific dates. The issue is that the time_range value I am passing is being accepted by the Facebook API endpoint but the result is incorrect.
Here is a sample endpoint I am using:
The result list shows a list of ads beyond the indicated time ranges.
Upvotes: 0
Views: 401
Reputation: 338
Your problem has probably been solved. However, I would like to share details on how I solved the problem for those who still experience the same error and reach this page while searching.
This problem is directly related to the limit
parameter. If you experience a data incompatibility, try defining the limit
parameter if it is not defined, or increasing its value if it is defined.
For example, the final api url in my case is as follows;
https://graph.facebook.com/v20.0/act_xxx?fields=campaigns.filtering([{field:"spend",operator:"GREATER_THAN",value:0}]).limit(1000){id,name,effective_status,created_time,start_time,stop_time,objective,insights.breakdowns(age).time_range({'since':'2024-12-10','until':'2024-12-17'}).time_increment(1).limit(1000){spend,impressions,clicks,actions,action_values}}&access_token=xxx
Upvotes: 1