Facebook Custom Audience Custom Graph Template

Kitewheel has integrated with the Facebook Graph API. This allows your brand to link up customer data to power automated real time audience management such as add/ remove users from custom audiences or even create new audiences.

What is a Facebook Ad Audience?

The Facebook Ad Audience is a set of data to identify (or specify the demographics/ characteristics) users that you desire to expose the ad to. This is defined by a marketer and uploaded to the Facebook Marketing Platform. 

There are two methods for creating and maintaining an Ad Audience:

How does the Facebook Marketing API work?

The Facebook Marketing API can be used via a series of Authenticated (OAuth2) RESTful API calls. The first step to obtain a User Access Token requires a Facebook login (manual) however requesting extended and refreshing tokens can be automated. Creating and managing Audiences can also be automated.

Marketing API Quickstart

Follow steps 1,2,3,4,6 in https://developers.facebook.com/docs/marketing-api/quickstart


Package contents

  • Connections
    • facebookGraphAPI - REST web service -  used for all operations
  • Graphs: 
    • testAudienceCalls
    • addProfileToCustomAudience
    • removeProfileFromCustomAudience
  • Public Variables: 
    • fbAccessToken - current value of the access token - populated from appParams public variable
    • fbAudienceId - value of the audience identifier to be used for operations
  • Schema
    • fbContact - hold the fields for a Facebook contact 

      {
          "fbContact": {
              "email": "",
              "emailHash": ""
          }
      }

Setup 

INSERT INTO appParams(paramKey,paramValue,paramType,description) VALUES
('fbAppToken', 'YOURTOKEN','string' 'Facebook Application Token');

Using

  • fbAddToCustomAudience  
    • Expects the public variable fbAudienceId to be set appropriately 
    • Expects the Email address to be in the email field of the fbContact schema location
    • Returns true on success 

Privacy Policy
© 2022 CSG International, Inc.