Filipe Ferminiano
Filipe Ferminiano

Reputation: 8801

ImportError: No module named objects in facebook ads api

I'm trying to use Facebook Ads API, but I'm getting the following error:

ImportError: No module named objects

This is my code:

from facebookads.objects import (
    AdUser,
    Campaign,
)

How can I fix this?

Upvotes: 1

Views: 3776

Answers (1)

Tarun Lalwani
Tarun Lalwani

Reputation: 146630

You need to use

pip install facebookads==2.5.0

The objects was deprecated from 2.6.0. You can see header in the objects file

"""
DEPRECATED

This file is kept for backward compatibility.
Please use objects in adobjects folder instead.
"""

Upvotes: 2

Related Questions