Skip to Content
Product Information
Author's profile photo Michael Knoespel

SAP Marketing Cloud: How to create a Facebook App for Campaign and Custom Audience Integration

Introduction

SAP Marketing Cloud offers two integration scenarios with Facebook.

  1. Facebook Page Integration
  2. Facebook Campaign and Custom Audience Integration

 

Disclaimer: “The Facebook user interface has changed, and the instructions below are no longer accurate. For more information on how to create a Facebook app, refer to the Facebook documentation Create an App – Meta App Development (facebook.com).”

 

This blog post focuses on the Facebook App creation to enable the second scenario, Facebook Campaign and Custom Audience Integration.

With the integration you have the possibility to use your SAP Marketing Cloud Target Groups (custom audience) on Facebook including Instagram and the Facebook Audience  Network. With SAP Marketing Cloud you can plan, execute and analyze the performance of your Facebook campaigns.

Upfront I kindly refer to the application help and the SAP Marketing Cloud Integration Guide, which contains all important information and is updated regularly.

 

Disclaimer: SAP has no impact on the Facebook App review or the app review process itself. Facebook has always the right to reject Facebook Apps without any reason.

 

The goal of this blog is to create a Facebook App which can be used for the SAP Marketing Cloud – Facebook Campaign and Custom Audience Integration.

 

For productive usage of the Facebook App, your app must be live, and the following permissions must be approved:

Facebook Login
Ads_management (Standard Access)

 

For further details see the  SAP Marketing Cloud Integration Guide

To get started, get a rough understanding of the Facebook App, Facebook App review, Facebook App Access Levels and the Marketing API sample submission.

 

Facebook App Creation for SAP Marketing Cloud – Facebook Campaign

Remark:

 

In the example the SAP Marketing Cloud URL is used. Replace it with your personal SAP Marketing Cloud URL.

Example SAP Marketing Cloud URL: http://my300011.s4hana.ondemand.com/

 

The following artifacts are needed for the Facebook App:

  • Company logo
  • Data Privacy URL
  • SAP Marketing Cloud URL
  • Redirect URI of SAP Marketing Cloud URL (see Integration Guide)

 

Step 1 – Create a new Facebook App:

Go to https://developers.facebook.com/apps/ and create a new Facebook App by pressing”Add a New App”.

Image 1: Add a new Facebook App

 

Select “Implement Marketing API”, this will add the “Marketing API” and automatically the “Facebook Login” products to your app.

Image 2: Implement Marketing API

 

The Facebook Login and Marketing API products are added to your app.

Remark: Grey check marks means these Facebook APIs are not yet approved. A green check mark means approved.

 

Image 3: Facebook App Settings (Basic and Advanced)

 

Step 2 – Do Basic and Advanced App Settings:

A) Basic Settings

  1. Add app icon
  2. Add privacy URL
  3. Add app domains: use the hostname of your SAP Marketing Cloud Tenant (without https://)
  4. Select business use: Choose “support my own business”
  5. Select category: Choose “Business and Pages”
  6. Add contact email address

Remark: The App ID and App secret is needed to configure the Facebook Integration in SAP Marketing Cloud

 

Image 4: Basic Settings including App ID and App secret

 

B) Advanced Settings:

  1. Go to Settings section “Advanced Settings”
  2. Turn off “Social Discovery” (not needed)
  3. Add your Business Manager
  4. Add Marketing Cloud URL to the Domain Manager section
    1. Go to the Domain Manager section
    2. Add the URL your Marketing Cloud
    3. Click Add Domain: URL: http://my300011.s4hana.ondemand.com/
    4. Choose Exact Match
    5. Prefetch Setting: use the defaults: HTML, JavaScript and CSS
    6. Click Apply

 

Image 5: Advanced Settings, turn off “Social Discovery”

Image 6: Domain Manager, add your SAP Marketing Cloud as a Domain

 

Image 7: SAP Marketing Cloud Domain Settings

 

Step 3 – Set up Facebook Login

  • Go to Facebook Login section “Settings” and choose:
    • Client OAuth Login: Yes
    • Web OAuth Login: Yes
    • Enforce HTTPS: Yes (default)
    • Force Web OAuth Reauthentication: No
    • Embedded Browser OAuth Login: No
    • Use strict Mode for Redirect URIs: Yes
  • In the section “Valid OAuth Redirect URIs” enter the redirect URI of your SAP Marketing Cloud as described in the SAP Marketing Cloud Integration Guide
  • Go to Facebook Login section “Quickstart”
    • Choose “Web” as platform
    • Enter your companies site URL
    • Save your changes
  • Check the settings in the screenshot below – your settings should match

 

Image 8: Facebook Login Settings

Image 9: Facebook Login Quickstart, choose Web as Platform and add Site URL

 

Step 4 – Set Up Marketing API:

  • Go to Marketing API section “Settings”
    • Choose your Business Manager
    • Add “Ads Management Standard Access” to your app review submission

Remark: You can already set up the Communication Arrangement in SAP Marketing Cloud and test with the Facebook user and ad account associated with the app.

 

Image 10: Marketing API Settings

Step 5 – Set Up Communication Arrangement in SAP Marketing Cloud:

For the next steps you need a working integration, for example, to create a video.

For details see the SAP Marketing Cloud Integration Guide

 

Step 6 – Produce a video:

You must provide a video for the Facebook Login permission and a video for the Ads_management (Standard Access) permission.

Facebook provides an example video on the Marketing API sample submission page.

For the Facebook Login permission video, you can show the creation of a Facebook campaign and then trigger the user authentication flow to Facebook by pressing the “authenticate button” in the campaign designer UI.

For the login video it is important to show that the login uses your Facebook App.

For the Ads_management permission video, you can show the campaign creation, performance tab with analytics, including charts and various drilldowns. You can use the CSV upload to add data to your Facebook campaign in case you do not have a real example of a Facebook campaign yet.

Remark: Be aware that SAP can’t produce such videos for you because the video must show your new app.

 

Step 7 – Test the App 

Test your app to increase the successful calls of the app to the Facebook API – for example, create campaigns

 

Step 8 – App Live Mode

Turn on live mode. For further details see the Facebook documentation on switching on live mode.

Remark: Once the app is set to live, the unapproved permissions for Ads_management and login will disappear. This means the app can’t be used to create a campaign (ad account retrieval will fail). Also, in the graph API console this access is missing.

Once APIs are approved, everything will work again.

 

Step 9 – Submit your app for review

Sumbmit the App for review.

 

Remark: To use your App productively you need the following permissions approved:

  • Facebook Login
  • Ads_management (Standard Access)

 

You can use the following text for your app submission:

Hello Facebook,

we are using SAP Marketing Cloud and would like to create Facebook campaigns and transfer custom audiences with SAP Marketing Cloud to Facebook. Campaigns and custom audiences are used for advertising.

Details: https://help.sap.com/viewer/b88f770e4b7c4ecead5477e7a6c7b8f7/LATEST/en-US/7d6b9556027ed75fe10000000a441470.html

SAP Marketing Cloud is a marketing suite offered by SAP and is a server-to-server app:

https://developers.facebook.com/docs/apps/review/server-to-server-apps/

The Facebook login is necessary to fetch a user access token to access the Marketing API (Ads_management permission).

Thank you for your approval.

With best regards

--- Your Name Here ---



1) Logon to SAP Marketing Cloud

2) Open SAP Marketing Cloud Campaigns app

3) Create a new campaign

4) Click Authenticate

5) OAuth 2.0 login flow starts with Facebook


For details see uploaded screencast.

 

Image 11: Facebook review submission

Image 12: Submit Facebook App for review

 

Remark: The Business Verification is a prerequisite of the Ads Management Standard Access.

Image 13: Business Verification

 

Remark: It might be that Facebook Login or Marketing API permissions get approved independently. See intermediate result below: Facebook Login permission is approved (green check mark), ads management permission is still pending (grey check mark)

 

Image 14: Intermediate result, Facebook Login approved, Marketing API pending

 

Submit approval for Marketing API: Ads Management Standard Access

Image 15: Ads Management Standard Access submission

 

Image 15: Ads Management Standard Access submission approval form

 

Final Result – Approved Facebook App

Once both APIs are approved your app should look like this:

Image 16: Facebook Login and Marketing API approved

 

Step 10 – Test the integration

Test your app with business users.

 

Summary

This blog showed how to create a Facebook App including approval for SAP Marketing Cloud.

 

Did you have any issues with the integration?

Have a look at the Facebook troubleshooting consulting note.

 

Further readings

 

Best regards

Michael

Assigned Tags

      24 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Bart van Putten
      Bart van Putten

      Hi Michael,

      Thanks for the extensive Blog, this is very helpful.

       

      A question from my side. We have integrated Facebook with the Marketing Cloud (scenario 1 and 2) for our project. we noticed that for scenario 2 if we keep the Facebook app in development mode all the different functionalities are working (sending campaigns from MKT to Facebook, sending audiences, acquiring performance data from Facebook campaigns). What is the extra benefit of going through the approval process as the app seems to be working without it?

      Also, is there going to be a blog for scenario 1? As I noticed this process is also difficult.

       

      Best regards,

       

      Bart

      Author's profile photo Michael Knoespel
      Michael Knoespel
      Blog Post Author

      Hi Bart,

      thanks a lot for the great question.

      I kindly refer to the Facebook help: Facebook App Access Levels

      Just a few benefits to mention for Ads Management standard Access:

      • In development there are restrictions on the users (developers vs. advertisers)
      • Better rate limits/number of calls you can issue per hour

      Usually the rate limits can be a quite big issue depending on how much business you are doing with Facebook.

      Best regards

      Michael

      Author's profile photo Praveen Tunki
      Praveen Tunki

      Hi Michael,

      Nice Blog and explanation.! We are trying to do a one way communication from the Facebook to yMKT.

      In Facebook, we have  Adforms and anybody fills out the information that data would like to extract it to Marketing cloud. We would like to bring in the new profiles from Facebook to yMKT.

      Does this possible with the Facebook integration?. I wasn't able to find any Iflows which is supporting in yMKT.

       

      Thanks

      Praveen

      Author's profile photo Michael Knoespel
      Michael Knoespel
      Blog Post Author

      Hi Praveen,

      this is not possible with the Marketing Cloud - Facebook Ads integration. This is an "outbound integration" like stated in the Integration Guide.

      For sure both processes make a very nice closed loop scenario with full support of data privacy and data protection (GDPR).

      For your use case I recommend to take a look on the contact and interaction API of Marketing Cloud:

      Contact API

      https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/1905.500/en-US/06526bdbae42455ba69a4aef0750561b.html

      Interaction API

      https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/1905.500/en-US/6322d15482854566a72f6c9f1ab6cd1e.html

       

      Best regards

      Michael

      Author's profile photo Carlos Fernando Rivas
      Carlos Fernando Rivas

      Hi Michael

      We configure the scenario in our system. Our customer needs to load an additional field into the Facebook performance campaing. It could be possible to extend a field in the CSV file for Success Campaign Data import for Facebook an Google Ads?

      regards.

      Author's profile photo Michael Knoespel
      Michael Knoespel
      Blog Post Author

      Hi Carlos,

      yes you can extend the CSV file for campaign performance with custom measures and dimensions.

      You can find the details in the SAP Marketing Cloud Documentation

      Focus on the usage “CSV upload for campaign performance”

       

      Be aware that the of the Facebook integration scenario is a out of the box integration (beside the Facebook App). Extensibility is not necessary.

      Author's profile photo Carlos Fernando Rivas
      Carlos Fernando Rivas

      Hi Michael, thanks for your answer.

      I try to access the lik bur it shows me that i need permissions. I follow the steps on the following link

      https://help.sap.com/viewer/13d84c47bb6749a188fd53915c256516/1902.500/en-US/4c21206824f44f9fbf729568b2d5d6ea.html

      but, it just function to add the field in the CSV for External Campaigns performance.

      It could be possible for you to send me detailed info fo extend the CSV for Google and Facebook Ads?

      Regards

      Author's profile photo Alex Jakuba
      Alex Jakuba

      Hello Michael,

      I am trying to follow the steps, but in Step 4 I am stacked in Marketing API section – I cannot Add “Ads Management Standard Access” to your app review submission as there is no such an option (see the print screen).

      Can you advise me how to proceed further?

      Thank you in advance,

      Alex

      Author's profile photo Sridevi Ramachandran
      Sridevi Ramachandran

      Hi Alex,

      Thanks for your message.

      Facebook has done some changes recently to their app review steps as you can see from the info message on top of your app. Now Requested and available permissions are available under App review.

      To proceed..

      Go to App Review section “Current request” (or) Go to App Review section “Permissions and Features”
      Request “Ads Management Standard Access” to your app review submission

      We will update the documentation accordingly. Thanks.

      Best Regards,

      Sridevi.

      Author's profile photo Sridevi Ramachandran
      Sridevi Ramachandran

      Hi All,

      HEADS UP:  Facebook has released new Marketing api version v4.0 recently. In addition to ads_management permission, now it is required to have  'business_management' permission. If you have an already exisiting Facebook App or creating a new App, Please request this new permission too in your submission to Facebook.

       

      Thanks & Regards,

      Sridevi.

      Author's profile photo Jose Rangel
      Jose Rangel

      Hi All,

      Thank for this very extensive blog. It is very useful!

      I'm having one small challenge and I can't seem to solve it:

      In the Basic Settings of the Facebook App I wrote the yMKT Tenant Hostname (as recommended by this tutorial). For the Website URL I wrote the corresponding URL of our customer. But then I received the error notification: (using localhost as example for my yMKT Hostname)

      App domains must match the domain of the Facebook Web Games URL (https), Mobile 
      Site URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please correct these
      domains: localhost

      How could I solve this?

      Best regards

      Jose

      Author's profile photo Sridevi Ramachandran
      Sridevi Ramachandran

      Hi Jose,

      Domain and your website site url domain should match.

      Example:

      Domain my300011.s4hana.ondemand.com

      Website -siteurl  : http://my300011.s4hana.ondemand.com/

      Best Regards,

      Sridevi.

      Author's profile photo Andrea Pacheco
      Andrea Pacheco

      Hi  everyone, 

      I already set up the App in Facebook Developers account and the Communication Arrangement in Marketing Cloud in order to connect both systems.

      The authentication is successful when I create a new Facebook campaign from SAP Marketing. 

      But the Advertiser and the Conversion Fields in Parameters for Facebook Ads section from Marketing cloud are empty, it isn't  bringing the information from Facebook, although I have an admin account in the Facebook page. 

      Remarks: In Facebook Actually I have the app in Developer mode and i haven't done the video because first of all i want to do a test.

      Kind regards,

      Author's profile photo Sridevi Ramachandran
      Sridevi Ramachandran

      Hi Andrea,

      It's ok to keep a development app for testing purpose. You need to add users as a developer or admin of app. Do you have adaccounts and is it available in Business manager?

      Did you maintain the right 'Valid Oauth redirect uri'? Domain and Website url?

       

      Once all tested and the integration is working fine, then you can move the app to Live mode and to get approved from Facebook for productive usage.

       

      Best Regards,

      Sridevi.

       

      Author's profile photo Francisco Rocha
      Francisco Rocha

      Hi Strevi, Thank you for your response.

      As you said, I've already set up users as developer and ad account in Business manager.

      • Domain: s4hana.ondemand.com
      • URL: https://myXXXXXX.s4hana.ondemand.com/ of our Marketing Cloud
      • ‘Valid Oauth redirect uri’ https://myXXXXXX.s4hana.ondemand.com:443/sap/public/bc/sec/oauth2/client/redirect?sap-client=100

       

      It seems that the issue origin is when both systems are linked, the following error  message is showing in Marketing Cloud 

       

      “There was an issue with request parameters: Code 400, message 'Bad Request'.

       

       “(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v5.0. (Code:2635).”

       

       

      As a result of this issue,  in the FACEBOOK CAMPAIGN set up the  Advertiser field isn't showing

       

       

      Regards

      Thank you in advance,

      Andrea P.

      Author's profile photo Guilherme Lahr
      Guilherme Lahr

      Same issue here. It was working fine but now i got the same error message.

      Author's profile photo Priyen Maistry
      Priyen Maistry

      Hi Guilherme,

      Did you manage to sort out the issue?

       

      Regards,

      Priyen

      Author's profile photo Sridevi Ramachandran
      Sridevi Ramachandran

      Hi,

       

      Updates for Facebook version v5.0 is will be available in your cloud 2002 systems on Feb 15th weekend. Please follow up with your incident,

      Unfortunately newer apps which was created after V5.0 will be affected until the fix is applied. Apps in V4.0 and below will not get affected until the next timeline as mentioned in Facebook changelogs.

       

      Best Regards,

      Sridevi.

      Author's profile photo Priyen Maistry
      Priyen Maistry

      Hi Sridevi,

       

      I'm encountering the same issue now with V8.0. Any idea when this version will become available in SAP Marketing Cloud?

       

      Is there anything else I can do at this point to solve this issue?

       

      Thank you.

       

      Kind regards,

      Priyen Maistry

      Author's profile photo Priyen Maistry
      Priyen Maistry

      Hi Andrea,

       

      Did you eventually find a fix to the issue you outlined above?

       

      Thanks for your time.

       

      Regards,
      Priyen

      Author's profile photo Assaf Peer
      Assaf Peer

      Hi All,

      are there any updates regarding the ability to capture leads from Facebook and create them in Marketing Cloud without any developments? I know that other platforms do offer this connectivity.

      thanks!

      Assaf

      Author's profile photo Nick Epstein
      Nick Epstein

      Assaf Peer  I have seen there is an integration that does add contacts from Facebook however it says only from interactions such as comments and posts. I am not sure whether this would add leads from lead ad campaigns as the documentation is not clear.
      it states "Incoming posts are processed by SAP Marketing Cloud and stored as interactions. If an interaction contact does not already exist in the system, a new one is created."

      Please see here: https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/2005.500/en-US/531e3c90d64044e9a15f1d5a03f194f6.html?q=facebook%20marketing%20cloud

      And
      https://api.sap.com/package/SAPHybrisMarketingCloudFacebookIntegration?section=Overview

      Interested to know your thoughts as well

      Author's profile photo Nick Epstein
      Nick Epstein

      Sridevi Ramachandran & Michael Knoespel

      Great blog thank you.
      Have there been any updates to the integration to allow a two way sync of data between SAP and Facebook to allow lead gen form information to flow to SAP automatically as new contacts?
      If not do you know of a way to create such a sync that does not first require the facebook data to be sent to another external data storage and then pushed into SAP via API. It seems very complex comparative to other marketing platforms integrations.

      Author's profile photo Valentina Medos
      Valentina Medos

      Hi Michael,

      Really nice blog, thank you!

      One comment that I have noticed - recently I did submission for Ads Management Standard Access & ads_management. But looks like Facebook change something in the meanwhile with these 2 permissions you also should have pages_read_engagement & pages_show_list?

      Does somebody have info on why additional two new permissions are required?

      BR,
      Valentina