Open
Conversation
This commit integrates the Meta/Facebook Business SDK into the application. - Adds `facebook_business` and `gunicorn` to `requirements.txt`. - Initializes the Facebook Ads API in `app.py` using environment variables. - Adds a new API endpoint `/api/v1/facebook/adaccounts` to fetch ad accounts and verify the integration. - Updates the `.env` file with placeholder environment variables for the Facebook App.
Reviewer's GuideThis PR integrates the Meta/Facebook Business SDK by adding necessary dependencies, initializing the SDK at startup, exposing an ad accounts API endpoint, and updating environment placeholders. Class diagram for Facebook SDK integration in app.pyclassDiagram
class FacebookAdsApi {
+init(app_id, app_secret, access_token)
}
class AdAccountUser {
+get_ad_accounts()
}
class AdAccount {
+export_all_data()
}
FacebookAdsApi <|.. AdAccountUser
AdAccountUser "1" -- "*" AdAccount: owns
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Hard-Coded Secrets (1)
More info on how to fix Hard-Coded Secrets in General. Vulnerable Libraries (2)
More info on how to fix Vulnerable Libraries in Python. 👉 Go to the dashboard for detailed results. 📥 Happy? Share your feedback with us. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit integrates the Meta/Facebook Business SDK into the application.
facebook_businessandgunicorntorequirements.txt.app.pyusing environment variables./api/v1/facebook/adaccountsto fetch ad accounts and verify the integration..envfile with placeholder environment variables for the Facebook App.Summary by Sourcery
Integrate the Meta/Facebook Business SDK, configure it via environment variables, and expose an API endpoint to fetch ad accounts.
New Features:
Enhancements:
Build:
Chores: