facebook-python-business-sdk
facebook-python-business-sdk copied to clipboard
corrected uppercase DatePreset to lowercase for AdSet
The DatePreset values are lower cases. Simple fix.
Hi zachliu! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Because of these uppercase values, we should expect a very misleading warning message
facebook_business/utils/api_utils.py:30: UserWarning: value of date_preset might not be compatible. Expect date_preset_enum; got <class 'str'>
warnings.warn(message)
if we do something like
campaign.get_ad_sets(params={'date_preset': 'last_30d'})
because last_30d doesn't match with LAST_30D :crying_cat_face:
And if you are using the STRICT_MODE, your code would fail with the same confusing message.