News for Developers

Back to News

Create Offer Plugin

Marvin Kwok
September 26, 2017

Related News

Rules Engine Quickstart

November 08 2017

Decoded

September 20 2017

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.


Related News

November 08 2017

November 07 2017

September 20 2017

August 02 2017

July 10 2017

July 05 2017