facebook / facebook-python-business-sdk

Python SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
1.29k stars 635 forks source link

Api call cannot be made if api is not set #509

Closed gianmarco-longhi closed 6 years ago

gianmarco-longhi commented 6 years ago

Hi guys, I just updated the facebookads library (which was working perfectly until today) but somehow I cannot connect the API anymore. I'm currently working on a tool which tests ads and I have many API calls to make inside my tool. But whenever it tries to make one, it returns this error:

facebookads.exceptions.FacebookBadObjectError: Api call cannot be made if api is not set

I guessed I had to init the service first and therefore I added this outside of my Main:

FacebookAdsApi.init(app_id, app_secret, access_token)

But it still returns the same error. Does anybody have a clue?

jingping2015 commented 6 years ago

Can you provide the sample code which havs this issue ?

jingping2015 commented 6 years ago

We've been unable to reproduce this bug, and are unable to investigate further. We are closing the issue for now, if you identify a test case we can use to reproduce your bug feel free to re-open.