开发者

Migrating Ads call from Legacy REST API to Graph API

开发者 https://www.devze.com 2023-03-30 17:56 出处:网络
In the past, I was using the legacy REST ads.getAdsGroup call which开发者_如何学Python allowed filtering on an accountId, campaignIds, and adGroupIds all in a single call.

In the past, I was using the legacy REST ads.getAdsGroup call which开发者_如何学Python allowed filtering on an accountId, campaignIds, and adGroupIds all in a single call.

I've been staring at the Graph API documentation for the Ad group object and don't see an equivalent call to achieve all of the filtering in a single call.

Am I missing something obvious or do I need to figure out how to make multiple calls to the Graph API to achieve the same goal?


In short no, but here are the calls you'd use for each type of filtering (not sure if you already have discovered this or not, but here goes anyway.)

You can get multiple adgroups by id using the syntax:

graph.facebook.com?ids=<adgroup_id1, adgroup_id2, ...>

You can get adgroups by campaign by using the syntax:

graph.facebook.com/<campaign_id>/adgroups

You can get adgroups by ad account by using the syntax:

graph.facebook.com/act_<ad_account_id>/adgroups
0

精彩评论

暂无评论...
验证码 换一张
取 消