Back to News for Developers

Create Offer Plugin

September 26, 2017ByMarvin Kwok

We're now releasing the Create Offer plugin for developers who are interested in reusing the Facebook offer creation UI component and integrating the existing flow to their own website. This plugin helps save resources from implementing the similar offer creation flow using the Facebook Marketing API. After the offer creation, the offer id can be passed back through the callback function.

Set up the Facebook SDK for JavaScript

To set up the Facebook SDK for JavaScript, see these references:

Trigger the Create Offer page

To trigger the Create Offer page, run the following code:

FB.ui({         
  account_id: '<ACCOUNT_ID>',
  display: 'popup',
  method: 'create_offer',
  objective: '<OBJECTIVE>',
  page_id: '<PAGE_ID>',
}, function(response) {
  // callback
});

The Create Offer page appears:

Parameters

Name Description

account_id

Your ad account ID

display

popup

method

create_offer

objective enum{APP_INSTALLS,CONVERSIONS,LINK_CLICKS,OFFER_CLAIMS,PRODUCT_CATALOG_SALES,STORE_VISITS}

Campaign objective

page_id

Your page ID

Response

Struct {
  id: numeric string,
  success: bool,
}

For more details about the UI dialog, see Dialogs.


Tags: