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.
To set up the Facebook SDK for JavaScript, see these references:
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:
Name | Description |
---|---|
| Your ad account ID |
| popup |
| create_offer |
| Campaign objective |
| Your page ID |
Struct { id: numeric string, success: bool, }
For more details about the UI dialog, see Dialogs.