Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

facebook python

# Check out https://developers.facebook.com/docs/business-sdk/getting-started/
# Sample from the link above:
from facebook_business.api import FacebookAdsApi
from facebook_business.adobjects.adaccount import AdAccount

my_app_id = '{app-id}'
my_app_secret = '{appsecret}'
my_access_token = '{access-token}'
FacebookAdsApi.init(my_app_id, my_app_secret, my_access_token)
my_account = AdAccount('act_{{adaccount-id}}')
campaigns = my_account.get_campaigns()
print(campaigns)
 
PREVIOUS NEXT
Tagged: #facebook #python
ADD COMMENT
Topic
Name
1+1 =