Ads Plugin

Facebook Ads Plugin allows you to install and manage the Facebook Business Extension (FBE), create Facebook ads, and view Ads Insights on websites you manage.

Before You Start

You will need:

  • The Facebook App ID that you have shared with your Facebook Partner for access to FBE
  • To install the Facebook JavaScript SDK on the websites you manage

Add the Plugin

Ads Creation

Add the following code wherever you want the Ads Creation button to appear on the webpage:

Formatted for readability.
<div class="fb-lwi-ads-creation" 
       data-fbe-extras=
         "{'business_config':{'business':{'name':'{name-of-the-business}'}},
                     'setup':{'external_business_id':'{external-business-id}',
                  'timezone':'{timezone}',
                  'currency':'{currency-type}',
         'business_vertical':'{ECOMMERCE or SERVICE}',
                    'repeat':false}"
         data-fbe-scopes=manage_business_extension,{ads_management or catalog_management}
         data-fbe-redirect-uri={fbe-redirect-uri} >
</div>

Be sure to replace the following with the appropriate values:

  • {name-of-the-business}
  • {external-business-id}
  • {timezone}
  • {currency-type}
  • {ECOMMERCE or SERVICE}
  • {ads_management or catalog_management}
  • {fbe-redirect-uri}

Ads Insights

Add the following code wherever you want the Ads Insights button to appear on the webpage:

Formatted for readability.
<div class="fb-lwi-ads-insights" 
       data-fbe-extras=
         "{'business_config':{'business':{'name':'{name-of-the-business}'}},
                     'setup':{'external_business_id':'{external-business-id}',
                  'timezone':'{timezone}',
                  'currency':'{currency}',
         'business_vertical':'{ECOMMERCE or SERVICE}'},
                    'repeat':false"
         data-fbe-scopes=manage_business_extension,{ads_management or catalog_management}
         data-fbe-redirect-uri={fbe-redirect-uri} >
</div>

Be sure to replace the following with the appropriate values:

  • {name-of-the-business}
  • {external-business-id}
  • {timezone}
  • {currency-type}
  • {ECOMMERCE or SERVICE}
  • {ads_management or catalog_management}
  • {fbe-redirect-uri}

Reference

FieldTypeDescription

data-fbe-extras

Required

string

Define Facebook Business Extension-specific flows, such as the features and settings used to configure for the seller. business_config, setup, and repeat are required. See the FBE Reference for more options.

data-fbe-redirect-uri

Required

string

The required URI of app

data-fbe-scope

Required

string

manage_business_extension with either ads_management or catalog_management.

data-fbe-state

Optional

string

An opaque value used by the client to maintain state between the request and callback.

data-hide-manage-button

Optional

boolean

For Ads Creation settings only. Set to true it hide the FBE manage button.

Localization

You can change the language of the embedded comments plugin by loading a localized version of the Facebook JavaScript SDK. When you load the SDK, change the value of src to use your locale. Replace en_US with your locale, for example fr_FR for French (France):

src="https://connect.facebook.net/fr_FR/sdk.js#xfbml=1&version={latest-api-version}"

You may need to adjust the width of a Social Plugin to accommodate different languages.