简体   繁体   中英

Facebook Marketing API limits

I use marketing fb graph API through my fb app with developer level access. I need to basically get all data (info about campaigns, ad sets, stats, and so on) as often as possible. There are some limits and I'm reaching them pretty quickly calling graph marketing API. After a few hundred calls I'm stuck with err #17 - request limit reached .

My questions are:

  • is it possible and how to increase the limit
  • what's the efficient way of getting all data. I'm mostly interested in tracking changes (smth has been added/ updated/ deleted and stats), but first of course I need to gather all my marketing account data somehow.

Requesting each object for it's info / stats is going to hurt after a while. If you need detailed stats about engagement, social reach, impressions and such, you have a couple options:

The /reportstats endpoint is available for most objects and overs aggregation filters, specificity, column selecting and other useful things and can also be called to asynchronously generate a stats report for all of the objects you requests. This can even be done on an account level. You could easily retrieve a low-level aggregation of delivery stats for the entire tree of objects in your account or campaign.

Another more recent development in their API is the Insights endpoint, which is a centralized endpoint for retrieving stats as well and operates more like the rest of the graph API (request field names, filtering, preset, etc).

I recommend reading up on each for retrieving delivery stats for your ads api objects.

Additionally, if you're looking for the objects' attributes themselves, there are a couple options. The most useful one may be that you can request the graph api with no endpoint and a list of object ids in the params. The request would look like this graph.facebook.com/?ids=000000000 . Furthermore, you can use facebook's fields query parameter to return attributes about that object. But, wait; there's more. Facebook's graph api offers field expansion for connected objects through this same query parameter. That is to say, you could request all campaigns' attributes, all ad sets' names and all ad sets' ads' names like so:

curl -G \
  -d 'ids=00000000,111111111' \ # ids of campaigns
  -d 'fields=name,adcampaigns.limit(50).fields(name),adgroups.limit(50).fields(name)' \
  -d 'access_token=xxxxxxxxxx' \
  https://graph.facebook.com/v2.4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM