I Am Getting An Error When Using The Facebook Api
File 'SAMPLE_CODE.py', line 21, in from facebookads.adobjects.adaccount import AdAccount File '/usr/local/lib/python3.7/site-packages/facebookads/adobjects/ad
Solution 1:
Taken from this Question:
The version of your API and Python are not compatible.
The error is caused by the parameter called async
from get_insights()
, which since Python 3.7 isn't allowed anymore since async
is now a reserved keyword of python.
Solution: Use an older Python version (<3.7) or use a version of the API that is compatible with Python 3.7.
Solution 2:
Try facebook_business
instead of facebookads
. See this.
Post a Comment for "I Am Getting An Error When Using The Facebook Api"