0

We cannot find anywhere in the developer area the app_id, app_secret and page-access-token.

We are trying to pull our marketing data programatically with a Python script, to then export it as a CSV or write it to a DB. This is the code snippet that I copied directly from the official GitHub page:

import sys
sys.path.append('/opt/homebrew/lib/python2.7/site-packages') # Replace this with the place you installed facebookads using pip
sys.path.append('/opt/homebrew/lib/python2.7/site-packages/facebook_business-3.0.0-py2.7.egg-info') # same as above

from facebook_business.api import FacebookAdsApi
from facebook_business.adobjects.adaccount import AdAccount

my_app_id = 'your-app-id'
my_app_secret = 'your-appsecret'
my_access_token = 'your-page-access-token'
FacebookAdsApi.init(my_app_id, my_app_secret, my_access_token)
my_account = AdAccount('act\_\<your-adaccount-id\>')
campaigns = my_account.get_campaigns()

It works, in the sense that it connects to the API, but we simply cannot find these three properties:

my_app_id = 'your-app-id'
my_app_secret = 'your-appsecret'
my_access_token = 'your-page-access-token'

At this point, I'm starting to suspect that they first need to be generated and that we somehow don't have them even though we already have marketing data in there.

So, where exactly can we find them, either programatically or graphically through the website?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.