0

I Tried using Python SDK for initializing the Marketing API thereby Importing ad objects with simple API test calls.

Getting Module Import Errors:: eg: AS per facebook offical SDK for Python getting module name as facebookads.objects

Getting Module error:

from facebookads.objects import AdUser

ModuleNotFoundError: No module named 'facebookads.objects

#Add to header of your file
from facebookads.api import FacebookAdsApi
from facebookads import objects

my_app_id = '{your-app-id}'
my_app_secret = '{your-app-secret}'
my_access_token = '{your-access-token}' // Your user access token
FacebookAdsApi.init(my_app_id, my_app_secret, my_access_token)

But while checking for the package name in installed facebookad packages we are getting module name as adobjects.

/Desktop/facebook_api/facebookads/adobjects# pwd /Desktop/facebook_api/facebookads/adobjects

There are many more such errors arising while importing modules. IS there some way around to overcome these modules related errors.

1 Answer 1

0

facebookads 2.11.4 has no objects module or subpackage.

It does have a facebook.adobjects.user module that I suppose is what you are looking for.

Try using Python built-in help() to inspect a package or module content.

Sign up to request clarification or add additional context in comments.

1 Comment

How can i get Ad_Set_ID for particular campaign so as to retrieve ad set parameters for campaign.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.