Comments (8)
This seems to be more general than the specific case I have above. It seems like any call that creates an object does not flow the api instance.
I am using version 2.3.3 of this library.
from facebook-python-business-sdk.
Hey @dylanlingelbach, we don't flow the api object in the manner you're describing (but that might be a good PR). The flow you're using would require the following call after you instantiate the FacebookAdsApi
object:
api = FacebookAdsApi(session)
FacebookAdsApi.set_default_api(api)
Alternatively, you can skip creating the session and creating the FacebookAdsApi
object by doing the following:
api = FacebookAdsApi.init(app_id, app_secret_access_token)
me = AdUser(fbid='me', api=api)
ad_account = me.get_ad_account()
assert ad_account.get_api() == api
from facebook-python-business-sdk.
@ebzlo Then why does the readme documentation say that using multiple access tokens is supported and the only area where you have to again pass the api instance is with class methods?
From here, all the following workflow for these objects remains the same. The only exceptions are the classmethods calls, where we now should pass the api we want to use as the last parameter on every call.
from facebook-python-business-sdk.
I vote that the API should flow to all fetched objects!
How would I set the api on the fetched objects afterwards as it is now? I can't use set_default_api as I have many users at the same time.
from facebook-python-business-sdk.
@JDaance: you can use our forked version: https://github.com/Evzdrop/facebook-python-ads-sdk
We try to keep it up to date and have a few other changes there but should get you pointed in the right direction.
Hope this helps!
from facebook-python-business-sdk.
@rituparnamukherjee - was this fixed or no longer an issue in later versions of the SDK? Or are you saying you aren't going to fix this?
from facebook-python-business-sdk.
Apologies for confusion. We have updated quite a bit on the SDK. Would you mind sending out a PR for this off of the latest SDK version.
from facebook-python-business-sdk.
@rituparnamukherjee - ok, our solution is not ready for a PR, it is a pretty quick hack. Can we leave this open until you fix or we open a PR?
from facebook-python-business-sdk.
Related Issues (20)
- Which versions of this Business SDK package correspond to the Marketing API versions? HOT 1
- Always got "The value must be a valid insights metric" error HOT 2
- Stub files
- typechecker.py does not handle <list<map<string, string>>> correctly. HOT 1
- facebook_business.adobjects.business.Business get_ad_network_analytics() ERROR HOT 3
- Meta API does not respond to requests, hosted on Azure HOT 3
- Error : Cannot include in summary param error message HOT 7
- Inconsistent Event Reporting - Unknown error HOT 3
- Pulling from ad tables(ads, ads_insights, campaigns, adsets etc... ) getting "Cannot include video_p100_watched_actions...
- Embecodon
- Where do I get the placement and site_source_name values in the SDK? HOT 5
- Api to count the total number of objects HOT 1
- Any function to get Call to Action options?
- API/Function through which I can get the Call to Actions Options HOT 2
- Call to Ads API doesn't throw error on failure. HOT 1
- Not able to access Business User Insights for multiple users using the Instagram API.
- Permission Error with creative_sourcing_spec
- [BUG] Undefined symbol in __all__ HOT 1
- Getting Invalid Parameter OAuthException on trying to upload assets HOT 2
- Getting UnicodeDecodeError from curlify module when debug=True on video upload
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-python-business-sdk.