Facebook ads custom audience plugin enables integration with Facebook Ads Custom Audiences Syncing your Mautic segments.
- Require the FB ads library in the Mautic root directory Composer require facebook/php-ads-sdk:2.9.* The library has been tested on 5.6 to also work so if you get requirements errors try: Composer require --ignore-platform-reqs facebook/php-ads-sdk:2.9.*
- Create a new Facebook App: https://developers.facebook.com/apps/
- Add the Marketing API Product.
- Visit the Marketing API -> Tools page in your app and check the scopes and hit Get Token. Store this access_token for later use.
- Go into your Facebook Ads account management and get your ad account id.
- Visit the Marketing API -> Settings page in your app and add your ad account id.
- Visit the app Dashboard page and store the app_id and app_key for later use.
- Enable the plugin and enter your app_id, app_secret, access_token and ad accoun id. . If you have more than 10 segments you might get errors enabling the plugin on install. When your facebook App is in development mode the request rates are limited. Remove some segments en readd them later.
- Visit your facebook ads audiences page and check whether your segments have been added.
- Have your application running for a while. After you have reached 1000 successful API calls to your facebook app you can submit it for review and have proper rate limiting.