Feed Approach

The Facebook Business Extension, v1 is currently only available to whitelisted Partners. Please contact your Facebook representative for access.

The Feed Approach (recommended) is a simple pull model where you periodically generate a file with product information. Facebook then periodically fetches the file to get the most recent product information. Your plugin should create this file according to our developer specs and pass the URL of the file to the popup.

Any net new Facebook Business Extension integrations must use the Feed Approach.

Alternatively, the API Approach is a PUSH model, whereby your plugin makes direct API calls to Facebook.

Benefits of Feed Approach

  • No Facebook API calls or any API token required.
  • The feed file can be used for other purposes.
  • Product deletion can be handled implicitly by omission from the feed file.

Requirements

  • Store feed file in public access—You must store the feed file in a place that's publicly accessible via URL. You must pass the feed URL to the popup through message passing as one of the initial parameters.
  • Implement logic to generate feed file—Your plugin must have logic to generate the feed file, and mechanisms to periodically do so. For example:

    • If your platform has a framework to run periodic jobs, you can create jobs to generate feed files every day.
    • You can adopt an approach whereby your plugin provides an endpoint that starts the feed file generation when accessed, and we query this endpoint before fetching the feed. In the initial message, you can specify the location of your feed via the feedPingUrl parameterSee Facebook Page Shop Integration.
  • Include required fields in your feed file—Your feed file must include several required fields to generate a compatible feed file: description, title, id, image_link, link, brand, and condition. There are optional fields, such as product_type and google_product_category, which we recommend including, because this enables your plugin users to easily create product sets on Facebook. See Catalog, Reference for parameter details.

  • (Optional) Create a logic to estimate time to generate a feed file. See feedPingUrl in Facebook Page Shops Integration.

  • (Optional) To enable Facebook Page Shops, specify the canSetupShop parameter in the initial setup. This parameter allows users to decide if they want to sync products to a Facebook shop. See Message Passing.

Once you implement these requirements, you should pass a feed URL to the Facebook Onboarding Flow popup in the initial message via the feedUrl parameter. We manage the rest; for example, see example feed file and example plugin code.