admin管理员组文章数量:1220497
My goal is to associate all running ad id's with the creation time of the underlying asset. I think that this is the only way I can do it:
- Request all ad_ids running in an account
- For each ad id, get the creative id
- For each creative_id, get the object_story_spec or effective_object_story_id (for ads which are made from an existing post) 4a. Video ads, use the AdVideo with the asset ID
video = AdVideo(api=api, fbid=asset_id)
video.api_get(
fields=['created_time', 'updated_time'],
batch=batch,
success=partial(callback, asset_id=asset_id)
)
4b. Image ads: use the image hash to get the AdImage
image = AdImage(api=api, fbid=asset_id)
image.api_get(
fields=['created_time', 'updated_time', 'id'],
batch=batch,
success=partial(callback, asset_id=asset_id)
)
4c. For existing posts, use the Post API and get a long lived token like described here:
Use the graph tool to generate an access token Generate a long lived user token ;client_id={app-id}&client_secret={app-secret}&fb_exchange_token={short-lived-user-access-token} Generate a long lived page token /<PAGE_ID>?fields=access_token&access_token=<LONG_LIVED_USER_TOKEN> Use that long lived page token to connect to the api From there, we have the ad_id and the creation date of the underlying asset, all with batches. I'm sure I'm over-complicating things though!
版权声明:本文标题:What is the simplest way to get the creation time for different assets for Facebook Ads? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739290434a2156668.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论