Product Information
SAP Marketing Cloud: connecting your Facebook fan page to the Marketing Cloud
Introduction
SAP Marketing Cloud offers 2 different integrations with Facebook. The Facebook campaign and Custom audience integration has been covered by Michael Knoespel in the following blog post.
In this blog post I will write about the second integration between the Marketing Cloud and Facebook. With this integration you can make your posts and comments, that are created on your Facebook page, visible in the ‘sentiment engagement’ app in the Marketing Cloud. The sentiment engagement app will also be able to provide a sentiment score on these posts and comments so the customer can filter and analyze the positive and negative feedback from the end customer.
Blog Focus
On SAP Help you can find the information on how to configure the
for the connection between Facebook and the SAP Marketing Cloud. I will focus with this blog post on what steps you should take from the Facebook side.
Multiple Facebook fan page connections:
It is possible to connect multiple Facebook fan pages to the Marketing Cloud. Just be aware that you will need to set up a Facebook app for every Facebook fan page that you wish to connect.
Different steps to take
For the complete Facebook integration there are several steps that need to be taken from Facebook’s side. With this guide I will take you through these steps
- Setting up a Facebook app
- Finding Facebook credentials for CPI
- Getting Facebook approval to load in comments from your end customers
Be aware:
- Posts (made by the Page) will be sent immediately after connecting the CPI to the Facebook app, even when the Facebook app is still on ‘development’ mode. If you want to have the comments from your end customers to be flowing into the SAP Marketing Cloud you will need to go through the approval process from Facebook. This is explained in the approval chapter.
- This post is written in July 2019, it is possible that Facebook will change this procedure in the future
Setting up a Facebook app
Prerequisites:
- To start off you need to have a Facebook account, which has a Facebook page connected to it (this must be the Facebook page you would like to show in the sentiment engagement app).
- If you don’t have a Facebook fan page, there is a guide to set it up: here
- Important: you must have the admin rights of this Facebook fan page when creating the Facebook app
Step 1 – developers app:
Afterwards go to https://developers.facebook.com.
- If you haven’t used developers Facebook before: press the ‘Get Started’ button in the top right corner and go through the 4 steps (‘Register’, ‘Verify’, ‘First app’, ‘Tell us About you’) to get started. At the ‘First App’ screen define the name of your app.
- If you have used developer Facebook before: press the ‘My apps’ button in the top right corner and press ‘Add new App’. Create the name of the app and go through the security check.
Step 2 – select a scenario:
At the next screen, Facebook will ask you what kind of scenario you would like to choose. You won’t need a predefined scenario for this app, so you can skip this part.
Step 3 – fill in basic setting
You will need to have this basic information filled in to be able to have your app approved by Facebook.
Under settings > basic, fill in the following information:
- App icon
- Privacy URL
- App domains: ‘myxxxxx.s4hana.ondemand.com’ This should be same as your SAP Marketing cloud Tenant.
- Contact email
- Select business use: ‘Support my own business’
- Select Category: ‘Business and Pages’
- Under ‘Business Verification’, select ‘Get Started’ and add your company’s Business Manager account to the app. If you don’t have a Business Manager account setup, then a guide can be found here
Remark: make sure you have your Business Manager account verified, before going for the approval process. A guide can be found here. - On the bottom of the page there is a button called ‘+ add platform’. Press this button. A new box will be added to the bottom of the screen. Under the text ‘Site URL’ add your Marketing Cloud tenant > http://myxxxxxx.s4hana.ondemand.com/.
You have now created your Facebook app. Next step is to connect your newly created app with the Marketing Cloud.
Finding Facebook credentials for CPI
To get the posts and comments into the Marketing Cloud you will have to provide the following credentials, which you will need for the setup of the CPI.
- Facebook app ID
- Facebook app secret
- Facebook page access token
Setting up the CPI part of the Facebook integration, can be found here.
Credentials
- First to find your Facebook app ID, go to ‘basic’ under settings in the left tab (see #1 in screenshot) in developers.facebook.com
- There you can find your App ID (see #2 in screenshot). Write this down so you can provide this to the person that is setting up the CPI
- Afterwards Press the show button beneath the App Secret, to also see your app secret. Write this down so you can provide this to the person that is setting up the CPI. (see #3 in screenshot)
- Afterwards go to ‘Tools’ in the right top corner. and click on Graph API explorer (see #4 in screenshot).
- In the Graph API Explorer choose your registered app from the drop-down menu next to ‘application:’ (See screenshot under point 7, #4 in the screenshot).
- Press on ‘Get Token’ (See screenshot under point 7, #5 in the screenshot). Choose in the dropdown menu under ‘Page Access Tokens’ either:a. Your page that you wish to connect to your app – go on to point 7
b. Or if you only see ‘get page token’, press on ‘Get page token’ (See screenshot under point 7, #6 in the screenshot) – go on to point 6.1.- Step 1, A pop-up opens. Continue through the first step.
- Step 2, choose the page you wish to connect to.
- Step 3, put the Manage your Pages to ‘yes’ for your Page.
- Press done.
- Afterwards you can see you page under Page access tokens (under the ‘Get Token’ button). Press on ‘Get Token’ (See screenshot under point 7, #5 in the screenshot) and choose in the dropdown menu under ‘Page Access Tokens‘ your page that you wish to connect to your app.
- Step 1, A pop-up opens. Continue through the first step.
- Click i in the access token field. Click ‘Open in Access Token Tool’ to see the token in Access Token Debugger (See screenshot below, #7).
- Click ‘Extend Access Token’ in the open access Token Tool debugger to get a long-lived user token. The Expires property should have a longer time, such as 60 days.
- Copy the new access token that is in the access token field à This access token is the Page access token that needs to be used in the CPI
Remark: You will have to create a new page access Token every 2 months, if you wish to keep on sending over information from Facebook to the Marketing Cloud
Getting Facebook approval to load in comments from your end customers
When the credentials from the previous step are entered into the CPI and the CPI and the Marketing Cloud are set up correctly, then there will be a connection between your Facebook page and the Marketing Cloud. You will be able to see the posts from the fan page in the Sentiment Engagement app of the Marketing Cloud.
To be able to also load in the comments from your customers into the Marketing Cloud, then you will need to first have approval from Facebook for the following 2 features in Facebook:
- Publish_pages
- Manage_pages
To apply for permission, go to the left panel, press ‘App Review’ > ‘Permissions and Features’ and find the features ‘publish_pages’ and ‘manage_pages’ and press on the ‘Request’ button on the right side.
Then go to ‘Current Request’ under ‘App review’ in the left panel.
To be able to go through the review process you will need to fill in 5 different areas:
- Review your app settings (this has already been done in the step ‘fill in basic setting’)
- Verify your business (this has already been done in the step ‘fill in basic setting’)
- Provide verification details
- Tell us how you’ll use publish_pages
- Tell us how you’ll use manage_pages
These steps are explained in more detail in the following chapters.
Provide verification details
For the approval process, Facebook will also need to be able to test if the Marketing Cloud is using the Facebook app correctly. They will need to see how the Sentiment Engagement app of the Marketing Cloud is using the data from Facebook. Therefore, you will need to set up a Marketing Cloud user with a business role that has only limit access. Make sure this user has read access to the Sentiment Engagement app.
Possible text you can use in ‘App verification details’ part:
“Testing username: <insert username>
Testing password: <insert password>
- go to the SAP Marketing Cloud (https://myxxxxxx.s4hana.ondemand.com)
- Fill in your login details
- In the SAP Marketing Cloud go to the ‘Sentiment Engagement’ app
- In the left panel in the Sentiment Engagement app change the timeline to ‘years’ and under channels click on Facebook
All the posts will show up from the <insert Facebook page> page.”
Tell us how you’ll use publish_pages
In the top text box, you can use the following text:
“We are integrating Facebook with the SAP Marketing Cloud. In the Marketing Cloud there is an app ‘Sentiment Engagement’ where we can gather data from the Facebook fan page (insert fan page) from the client. With the Facebook app we want to gather the posts from the Facebook fan page and also the comments on those posts by the Facebook users. We need the permission publish_pages to be able to gather any comments from our (insert fan page) page to the Marketing Cloud.
More info on: https://blogs.sap.com/2016/07/11/social-media-data-load-into-sap-s4hana-marketing-cloud/”
- Where it says ‘insert fan page’, put in the name of your Facebook fan page.
For the video:
- Show a video where you first see a post on your Facebook fan page.
- Afterwards log in to the Marketing Cloud
- Show the same post in the Sentiment Engagement app.
Tell us how you’ll use manage_pages
In the top text box, you can use the following text:
“We are integrating Facebook with the SAP Marketing Cloud. In the Marketing Cloud there is an app ‘Sentiment Engagement’ where we can gather data from the Facebook fan page (insert fan page) from the client. With the Facebook app we want to gather the posts from the fan page and also the comments on those posts by the Facebook users. We need the permission manage_pages to be able to retrieve the Page Access Token for the Facebook page (insert fan page).
Please keep in mind, the tool we are using IS NOT customer facing, our internal marketers would like to see sentiment engagement scores for the brand.
More info on: https://blogs.sap.com/2016/07/11/social-media-data-load-into-sap-s4hana-marketing-cloud/”
- Where it says ‘insert fan page’, put in the name of your Facebook fan page.
For the video:
- Same video as for publish_pages
Submit for review
When all the previous steps are taken, you can submit for review. After approximately 5 days you will get feedback from Facebook if you have successfully gone through your approval.
Afterwards when the entire app has successfully gone through the application process, you will need to put your application on Live.
When reloading the Facebook data to the CPI, you will also be able to view the comments of your Facebook fan page in the Sentiment engagement app of the Marketing Cloud.
Summary
This blog post shows how to create a Facebook App, so that you can view your posts and comments of your Facebook fan page in the SAP Marketing Cloud.
Kind regards,
Bart van Putten
Great blog Bart van Putten !
However, regarding Facebook page access token token, I have good news for you and other people who are trying to integrate with Facebook pages. You can actually get a never expiring page access token by following steps here
You may want to update your blog with this information
Best Regards,
Hakan köse
Hi Hakan,
That is great to hear, thanks for you helpful addition!
Best Regards,
Bart van Putten
Nice blog!
However, according to the following Facebook document, permission publish_pages is useful only when you try to publish a post to your page through your Facebook application. Without this permission, you still can retrieve posts and comments.
https://developers.facebook.com/docs/pages/publishing
Best Regards,
Xin He
Hi,
Just adding a note here that this integration became deprecated:
https://answers.sap.com/questions/13386286/the-integration-package-between-mkt-and-facebook-i.html
just so anyone who still runs into this blog isn't confused.
Kr
Joyca