我使用 facebook 业务 SDK 通过 Python 从 facebook 业务经理获取数据。我可以使用 get_insights 方法获取几乎所有字段,但我无法获取结果字段。而且我在文档中看不到它。
params_ads={'time_range': {'since': '2021-03-01', 'until': '2021-03-23'},'level': 'ad', 'limit': '20000'}
fields_ads = [AdsInsights.Field.account_id,
AdsInsights.Field.account_name,
AdsInsights.Field.ad_id,
AdsInsights.Field.ad_name,
AdsInsights.Field.adset_id,
AdsInsights.Field.adset_name,
AdsInsights.Field.campaign_id,
AdsInsights.Field.campaign_name,
AdsInsights.Field.spend,
AdsInsights.Field.impressions,
AdsInsights.Field.clicks,
AdsInsights.Field.outbound_clicks,
]
ads = my_account.get_insights(params=params_ads, fields=fields_ads)