我正在尝试使用 python sdk 获取广告最终网址。
我尝试了所有字段,但无法找到返回广告网址的字段。目前我的领域是:
params = {'access_token':creds.refresh_token,
'fields':'action_values, actions, ad_name, adset_name, objective, outbound_clicks, outbound_clicks_ctr, call_to_action_clicks, campaign_name, cost_per_unique_click, cpc, cpm, spend, website_ctr, date_start, date_stop',
'action_breakdowns':['action_link_click_destination'],
'date_presets':'last_year',
# 'time_range':" since:2017-06-01, until:2017-01-03}"
}
ad_insights = requests.get("https://graph.facebook.com/v2.10/{}/insights".format(ad['id']), params=params)
我知道有些广告不会有最终网址,例如加速帖子,但许多广告仅指向一个网站,我如何获得“号召性用语网址”?
您必须为 AdInsights 报告的每个广告提取 adCreative。 adCreative 将包含出站链接。
参见此处https://developers.facebook.com/docs/marketing-api/reference/ad-creative
您可能会对以下领域感兴趣
嘿不确定这是否仍然相关,但对于那些登陆这里的人来说......我面临着同样的问题。这是解决方案:
https://graph.facebook.com/v19.0/{creative_id}?fields=object_story_spec&access_token={access_token}
一个好的方法是: 1/获取您的广告素材ID列表:https://graph.facebook.com/v19.0/act_798134188164544/adcreatives?access_token={access_token}
2/获取您想要的特定ID并使用上面的网址:https://graph.facebook.com/v19.0/{creative_id}?fields=object_story_spec&access_token={access_token}
干杯