admin管理员组

文章数量:1125917

I'm currently working on a workflow to fetch all posts made by my company on social medias. On Facebook, I'm currently using the ads_posts endpoint to fetch both organic and paid posts (was previously using /feed for organic posts and /ads on the business account for paid posts, however the ads endpoint was lacking some posts that were created through dynamic ads).

The current request is like this:

.0/{FB_PAGE_ID}/ads_posts?fields=id,created_time,updated_time&include_inline_create=true&access_token={PAGE_ACCESS_TOKEN}. 

The problem is, this endpoint only gets me data from within about a month ago. Any try to fetch data older than that using the filters "since" and "until" returns no data, and trying to go there manually through pagination gets me an error of:

Please reduce the amount of data you're asking for, then retry your request

(the "limit" filter doesn't help with this either).

Am I missing something here? Is this a limitation of the ads_posts endpoint? I couldn't find anything related to this on the API reference.

Also, i saw that the posts returned via /ads_posts are sorted by their creation time, while the ads fetched on the /ads are sorted by their update time. Is there any way to change the sorting of the ads_posts entries to their update time as well?

Thanks in advance!

Using .0/{AD_ACCOUNT_ID}/ads?fields=id,created_time,updated_time,creative{effective_object_story_id}&access_token={USER_ACCESS_TOKEN} i'm able to get ads from 2024-12-01 and before, with their effective_object_story_id that I can access through the post endpoint and check that they in fact exist.

Using the mentioned /ads_posts request, it gets me only posts as old as from 2024-12-06 (3101 posts total). Anything older than this gets me an error or no data at all.

All the posts have been published the same way, and the tokens used have all the needed permission.

本文标签: facebookMeta39s Graph API adsposts endpoint not returning all the data API LimitationStack Overflow