Python SDK for Meta Marketing APIs
OTHER License
Published by rituparnamukherjee about 9 years ago
Published by ebzlo about 9 years ago
Published by ebzlo over 9 years ago
Published by ebzlo over 9 years ago
Published by ebzlo over 9 years ago
Published by ebzlo over 9 years ago
build_objects_from_response
now checks if the data
object in the response is a list
RateCard
subclass to AdAccount
app_id
and app_secret
are no longer required in FacebookAdsApi.init
lifetime_impressions
added to AdSet
creative_sequence
now supportedget_ad_conversion_pixels
added for AdAccount
Published by ebzlo over 9 years ago
Published by ebzlo over 9 years ago
Published by ebzlo over 9 years ago
Published by ebzlo over 9 years ago
Fixed a few minor issues with new DPA Objects
Published by ebzlo over 9 years ago
Published by ebzlo over 9 years ago
Published by ebzlo almost 10 years ago
AdSet.get_by_ids(ids=[123123,123123])
FacebookAdsApi.set_default_account_id('act_123123')
del object['key']
will correctly update the change history, thus removing the key as a parameter in API request.CanArchive
mixin has been added which allows campaigns, ad sets, and ad groups to be archived by calling remote_archive()
try:
account = AdAccount('invalid-account-id')
account.remote_read()
except FacebookRequestError, e:
print e.api_error_message()
print e.api_error_code()
Check the exceptions.FacebookRequestError object for more method calls!
activities
endpoints.EdgeIterator
objects as if they're arrays:adgroups = account.get_ad_groups() # returns EdgeIterator object
print adgroups[0]
print adgroups[1]
remote_update()
will now return a correctly updated object without having to call remote_read()
again. Note: This is optimistic-- we do not re-fetch the data.adgroup = AdGroup(123123)
adgroup.remote_read(fields=['name'])
print adgroup['name'] # Outputs "Hello World"
adgroup['name'] = 'Changed Name'
print adgroup.remote_update()
Output:
<AdGroup> {
"name": "Changed Name"
}
CustomAudience
fields are now all definedCustomAudience
have been added.Published by ebzlo almost 10 years ago
print adaccount_object
or print len(adaccount.get_ad_groups())
will behave as expected and not spit out random stringsprint adaccount.get_ad_groups().total()
will output total number of ad groups for that account (not just what's in the array)adgroups = account.get_ad_groups(fields=['name'])
while True:
for adgroup in adgroups:
print adgroup['name']
if not adgroups.load_next_page():
break
Published by ebzlo almost 10 years ago
Published by ebzlo almost 10 years ago
Published by ebzlo almost 10 years ago
Published by ebzlo about 10 years ago
Published by ebzlo about 10 years ago