facebook / facebook-python-business-sdk

Python SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
1.29k stars 635 forks source link

Get Adsets data (Insights data, metafields) in a single request #480

Closed tranngoctan18 closed 6 years ago

tranngoctan18 commented 6 years ago

I like to get Adsets fields (name, daily_budget, status) along with Adset Insights (spend, impressions, actions). I found that we could use Graph API with nested fields like this.

https://graph.facebook.com/v3.0/act_/adsets?fields=insights.time_range({'until':'2018-06-12', 'since':'2018-06-11'}){impressions,actions,spend},name,daily_budget,effective_status

How can we make this call in Python SDK?

Thank you,

jingping2015 commented 6 years ago

Please take look example here https://developers.facebook.com/docs/marketing-api/reference/ad-account/v3.1