Skip to content

Instantly share code, notes, and snippets.

@georgi
Created November 4, 2015 14:40
Show Gist options
  • Save georgi/5ed9876dc7c02959ffc2 to your computer and use it in GitHub Desktop.
Save georgi/5ed9876dc7c02959ffc2 to your computer and use it in GitHub Desktop.
Ad creative
import json
from facebookads import FacebookAdsApi
from facebookads.objects import Ad
from sys import argv
config_file = open('./config.json')
config = json.load(config_file)
config_file.close()
FacebookAdsApi.init(
config['app_id'],
config['app_secret'],
config['access_token'],
config['act_id']
)
ad = Ad(argv[1])
ad.remote_read(fields=['creative{object_story_spec}'])
print(ad)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment