Skip to Content
Technical Articles
Author's profile photo Wendy Wang

Facebook Page and SAP Cloud for Service Integration Requires Facebook App Review

Disclaimer: The aim of this blog post is to provide a better understanding of the Facebook App Review procedure with regard to the integration between Facebook and SAP Cloud for Service (C4S), a solution of SAP Service Cloud portfolio, it is not the product documentation.

As the required Facebook permissions as well as review process might be changed overtime per Facebook’s policy, so if there is any change, I will publish a new blog post with updated information.

In order to be aware of any possible updates, I recommend to follow my profile  and update your notification settings to receive updates regarding this topic.

Meanwhile, be noticed, the information provided does not guaranty the app review approval from Facebook reivew. You are responsible for the continuity of apps and its contract with Facebook.

1. Overview

SAP Cloud for Service (C4S) supports a company’s service agent to directly reply from C4S to the Facebook user who makes posts, comments or direct Messenger conversation to the company’s Facebook page. A Facebook page is owned by a Facebook account. A page owner can grant access to a 3rd party Facebook app, allowing it to interact with that page on the owner’s behalf. This is how the C4S and Facebook integration works.

While in Development mode, apps are automatically approved for all login permissions, features, and product-specific features. You can test your integration with C4S.  But before you go live with your app, you will need to request some special Facebook permissions in order to integrate with C4S. These additional permissions will require your Facebook app to pass an App Review.

Before the Facebook Graph API was changed from V3.2 to V3.3 in April 30, 2019,  you would have to request for the following permissions – manage_pages, read_page_mailboxes, publish_pages for your Facebook app.

With the Graph API change, the Conversation API and Private Reply endpoints now require the pages_messaging permission, as the read_page_mailboxes permission is deprecated. Apps previously approved for read_page_mailboxes need to go through App Review for pages_messaging permissions approval.

So, for any new app to be integrated with SAP Cloud for Service after V3.3, The following permissions are subject to review:

  • manage_pages: Required for listing a user’s pages and obtaining page access tokens. Apps that allow users to publish as a Page must also have the publish_pages permission. To add review submission, from the Facebook dashboard, navigate to the App Review section, then click Start Submission.
  • publish_pages: Required for publishing posts, comments, and like Pages managed by the app user. Also requires the manage_pages permission. To add review submission, from the Facebook dashboard, navigate to the App Review section, then click Start Submission.
  • pages_messaging: Required for sending and receiving Facebook Messenger messages. First, add the Messenger product to your app, and then add this permission to your review request from the Messenger section of the Facebook dashboard.

Note: we do not request for any of the following permissions – “user_friends”, “user_link”, “user_gender”, “user_age_range” that are mentioned in their alert.

Please refer to this link from Facebook for the app review process.

2. Prerequisites

As the reviewer needs to log into your C4S  tenant to test the integration, so before you make the app review submission, you should follow this help center document to set up your Facebook app, and the integration with C4S tenant. Note: This is only possible when you Facebook app is not in live mode. Your app can only use permissions and features that it has been approved for. This means you will be unable to test usage of any unapproved permissions or features.

While creating your Facebook App, you should pay special attention to the following points:

1.Maintain the App Domains and Website:

2.

2.You have to make sure the valid OAuth Redirect URIs is maintained, the url is like this: https//myXYZ.crm.ondemand.com/sap/byd/oauth/facebook

If this is not correctly maintained, when the reviewer test your integration, they will receive the following error message:

3. Request Permissions

3.1 Manage_pages, publish_pages

3.1.1 Where to submit the app review request:

  1. You sign into your app’s dashboard, click App Review then click Permissions and Features.
  2. Search for manage_pages, publish_pages, request both of them.
  3. Both of the requests will be displayed in the Current Request section.

3.1.2  Complete verification

Under App Review, click Current Request section, then provide verification details by clicking the blue arrow icon in the Provide Verification details row. In the opened dialog window, make the selection per the sceenshot below.

Meanwhile, in the provide detailed step-by-step instructions input box of the screenshot above, try entering the following (Note: the URL and XXX needs to be replaced with your tenant and app specific value) :

“The permission is needed to integrate with SAP system SAP Cloud for Service. In order to test the integration, follow the steps covered in the screencast provided. Please use the following url and credentials for the test:

1.Log on to SAP C4S vial this URL using user: XXX and pwd:XXX

2. For the App ID and App secret to be entered for the first step: App ID: XXX App Secret: XXX

Note(To be deleted when submitting request): As Facebook App in development mode are automatically approved for all login permissions, and product-specific features. If the app to be reviewed is still in development mode, you can submit its app ID and secret to reviewer, they should be able to test the integration. If the app to be reviewed is already live, and you are just requesting for additional permission, Facebook suggest you use a test app for test

3. The Facebook developer account for this app to retrieve Facebook pages are : User Name: XXX Pwd:XXX ”  Note:  the system needs the manage_pages, Publish_Pages permissions, in order to retrieve a list of Facebook pages. Otherwise the system gives the error message.”

Note (To be deleted when submitting request): The reviewer might log in with their own developer account, and create a test page, but you might as well provide a test developer account just in case.

3.1.3 Explain how you’ll use the publish_pages and manage_pages permission

In the Requested Permission and Features section, click the blue arrow of publish pages and manage_pages, see the screenshot below

It opens up a screen as shown below:

For the first input box for both publish_pages and manage_pages, I’d recommend you try with the following:

The permission is requested to integrate with our CRM system, SAP Cloud for Service (C4S) system. C4S app allows our service team to send customer support messages to the Facebook user who makes posts, comments or direct Messenger conversation to our Facebook page (mainly for customer service). For the manage_pages permission, our app requires access to this permission to retrieve Page Access Tokens, and also due to the need of publish_pages permission that also requires manage_pages. The publish_pages and manage_pages permission allows the app to retrieve the public posts and comments on our Facebook page, which will be created as service tickets, and then our service team can publish content to our Facebook page.
Be noticed that the SAP C4S programmatically retrieves the public posts to Facebook page:
• A batch job is scheduled on a regular basis to pull messages from Facebook page.
• If there are new messages, a call is made to the Graph API using manage_pages, publish_pages  to pull messages from Facebook page.”

For the screencast, you can make a screencast in a C4S system that integrates with a Facebook app that is stil in development mode, it’s better that your screencast can cover the following parts as shown in this video. You can try directly upload this video, however, as the C4S tenant is different, not sure if reviewer will accept it.

3.1.4 Complete app setting

Before you can sumbit the request, you should review your app settings.

3.2 Page_Messaging

The page_messaging permission is needed if you will respond to Facebook Messenger message directly from SAP Cloud for Service.

3.2.1 Prequisites

Doublecheck if the valid OAuth Redirect URIs is maintained, the url is like this: https//myXYZ.crm.ondemand.com/sap/byd/oauth/facebook

3.2.3 Request the permission

For page_messaging, you should add Messenger to Products first, then follow the steps below to request the permission for page_messaging:

1.Go to Messenger and click Settings, navigate to the App Review for Messenger section as shown below:

2. Add Pages_Messaging to submission.

3. Open the submission form details. Check the “I agree to Facebook’s permission and feature usage guidelines.”

4. In the Tell us about the Use case(s) for your app will use the permission for section. Check the last one Others. Then I’d recommend you try with the following input:

The integration is for business integration with CRM system, there is no chatbot involved, the service agent can only manually reply to the messenger message when the message is imported to the CRM system, in the CRM system, the Messenger conversation is retrieved via scheduled batch job, and the message will be created as a service ticket, in the service ticket, the service agent can manually reply to the messenger conversation which will be shown to the Facebook user.”

4. Additional info

When you get the approval of the requested permissions, you should set the App to live mode in order to access live data. Meanwhile, business verification shall be done, also related contracts shall be signed per Facebook’s request.

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Andrii Hrach
      Andrii Hrach

      Thank you, it’s a very good post!
      Wendy, maybe you know, I’ve all permissions and contract on FB side. Screenshot
      But when change App status in “Live” in C4C have next error ” 403 :message#Application request limit reached#type#”OAuthException”,”is_transient”false,”code”4,”error_subcode”1349193,”error_user_title””Exceeded asset access limit”,”error_user_msg””You h’ ”

      Thank for all answer

      Author's profile photo Wendy Wang
      Wendy Wang
      Blog Post Author

      Hi Andrey,

      According to this Facebook bug report:  https://developers.facebook.com/support/bugs/348631119141897/, it might be related to the verification type, could you please check if you are doing individual verfionation or business verification. See the comments below:

      Thanks!

      Regards,

      Wendy

      Author's profile photo Andrii Hrach
      Andrii Hrach

      Hi Wendy!
      yes, the issue was with verification type. We resolve it deleted me in FB App on FB side.
      Thank!

      Author's profile photo Carles Llovell
      Carles Llovell

      Hello Wendy

      That was an excellent post. I could  configurate my integration perfectly.

      Nevertheless im stuck at the point when i need to send a message from C4C to facebook, related to a ticket. I already have the  page_messaging permission from facebook. But i can't find the way to write that messages from my c4c platform. Could you please give me a hand with that?

      Thank you!

      Rgs

      Author's profile photo Wendy Wang
      Wendy Wang
      Blog Post Author

      Hi Carles,

      The issue description is too general for me to understand the real issue here.

      At the same time, please confirm the following:

      1. Did you try to reply the social user via the Social Interaction tab of the Ticket?
      2. Or you did try to reply from Social interaction tab, but there is no reply button?
      3. Or when you reply, the message is not reached to Facebook?

      Would be great if you could report an incident is the issue is not resolved.

      Regards,

      Wendy

      Author's profile photo Carles Llovell
      Carles Llovell

       

      Hi Wendy,

      I can't see the Social Media interactions Facet from my Fiori Client view.

      Also, i have tried to create a Social Media Message through my Facebook Channel to my facebook account, and this error appears:

      "The external service provider 'C4Cproducts' reported the following error: :message#(#200) If posting to a group, requires app being installed in the group, and \\n either publish_to_groups permission with user token, or both manage_pages \\n and publish_pages permission with page token; If posting to a page,"

      I already have the Manage_pages, Publish_pages and Page_messaging permissions from facebook on my app.

      Do you have an idea of what could be the problem?

      Thank you so much for your help

      Rgds

       

      Carles.

      Author's profile photo Andrii Hrach
      Andrii Hrach

      Hello,

      Experts, can you send more info about How end-users must send answers from ticket to Facebook client.

      Use tab Interactions or SocialInteractions in the FIORI?

      I can't find any user guide

      Thanks

      Author's profile photo Wendy Wang
      Wendy Wang
      Blog Post Author

      Hi Andrey,

      HTML5 will be deprecated in 1911, for any interaction with the customer for social tickets, please always use Social Interaction tab of the ticket.

      Author's profile photo Andrii Hrach
      Andrii Hrach

      Hello, Wendy!
      Thank a lot!
      I opened my question in a separate thread https://answers.sap.com/questions/12882007/answer-from-ticket-to-facebook.html?childToView=12883342#answer-12883342
      Maybe you will be interested

      Author's profile photo Brandon Shirto
      Brandon Shirto

      Hi Experts,

      Can anyone advise on the process for getting the Publish_Pages permission review approved. My request for the Manage_Pages and Pages_Messaging permissions have been approved.

      Thank you for the awesome Blog Wendy, it has allowed me to get this far
      However even after following the advice as per the blog, I've still been declined on numerous occasions.

      The reason for being declined does not make sense and the review team only add a screen shot of the new Channel that they have created.
      I've provided them with the steps to follow after creating the Channel, so not sure if they do not know how to proceed or if the get stuck somewhere as there is no visible error on the screenshot.

      See below details that have been mentioned in my review:

      Provide verification details-->

      The permission is needed to integrate with SAP system SAP Cloud for Service. In order to test the integration, follow the steps covered in the screencast provided. Please use the following url and credentials for the test:

      Please note Test user has been created and Test Page has been added and linked to this test user
      See details below:
      User ID: XXX
      email: XXX@tfbnw.net (created using the Test Users menu) 
      name: XXX XXXX
      pwd: XXXX$$$####%%%

      URL: https://myXXXXX.crm.ondemand.com/
      As per the Screencast:
      1. Log on to SAP C4S via the above URL using user: XXXX and pwd: XXXXXX
      Create Facebook channel for Social media posts
      - Click on Administrator on the Left-hand menu
      - Select Service and Social
      - From the Social Media section choose Social Media Channels
      - This will return a list of Social media channels already created.

      2. Create a new Facebook Channel
      - Select 'New' button in the top right-hand corner of the screen
      - Select Facebook as the "Social Media Channel Type"
      - Enter your App ID and App Secret
      - Enter a Date and Time for Message Import
      - Log Level - Select 'Summary'
      - Direct Messages - 'Add to Completed Ticket'
      - Remove assigned Processor - 'No'
      - Create Ticket for Direct message only - 'No'
      - Click on the 'Connect with Channel' button
      - Follow the steps to allow you to connect to the relevant Facebook Page
      - In the Set Up Channels section, click on the 'Get Account Details' button
      - Enter a Channel ID
      - Click on Save and Close button

      3. Set up the Import job to import Posts and Content into C4S
      - Once the Channel has been created, Import Job needs to be set up
      - Select Service and Social in the Left hand menu
      - From the Social Media section choose "Social Media Message Import Runs"
      - This will return a list of current Import runs
      - To create a new run, select New in the top right hand corner, then select "Creation Run" button
      - Enter a Run description
      - In the Social Media Channels section, click on "Add Row"
      - Enter your Channel ID from the Channel that was created in Step 2, or Click on the "Double blocks" to open up more options and select your channel from the list.
      - Click on Save and Close

      4. Set up Import job
      Select Service and Social in the Left hand menu
      - From the Social Media section choose "Social Media Message Import Runs"
      - Click on the Row to select the newly created Import Run
      - Then click on Schedule in the Top right hand corner
      - Depending on requirements schedule the job, in this case as a "Recurrence"
      - Select Time frame in the drop down list - "By the Minute" to be used in this use case
      - Select your start Date and Time
      - Select the recurrence value - "Every 1 Minute" depending on frequency of the job
      - End Date and Time is populated based on requirment
      - Save and Close
      - Jobs can now be monitored

      - For this case study the Facebook channel has already been created.
      See Channel ID: XXXXX Channel Name: XXXXXX

      2.To Create a new Channel/Content for this Page, the Facebook user below can be used:
      XXXXX XXXXX
      email: XXXXXX@gmail.com
      pwd: XXXXXX

      Test Page has already been created.

      App ID: XXXXXX
      App Secret: XXXXXXXXXX

      Tell us how you'll use Publish_Pages-->

      The permission is requested to integrate with our CRM system, SAP Cloud for Service (C4S) system. C4S app allows our service team to send customer support messages to the Facebook user who makes posts, comments or direct Messenger conversation to our Facebook page (mainly for customer service). For the Publish_pages permission, our app requires access to this permission to retrieve Page Access Tokens. The publish_pages and manage_pages permission allows the app to retrieve the public posts and comments on our Facebook page, which will be created as service tickets, and then our service team can publish content to our Facebook page.
      Be noticed that the SAP C4S programmatically retrieves the public posts to Facebook page:
      • A batch job is scheduled on a regular basis to pull messages from Facebook page.
      • If there are new posts or if content is posted by a page editor or page administrator, a call is made to the Graph API using manage_pages, publish_pages to pull this content from the Facebook page into C4S as a Ticket. Any comments made on the post are also pulled into C4S

      In Order to test the functionality a post or content needs to be published on our page.

      You can view this content on the C4S System by accessing the System URL provided and Using the Username and password to log on.
      Once logged on:
      - Click on Service on the left hand Menu
      - Select Social Media Messages
      - From the List of Messages, please find the appropriate post or content that was published on the page
      - Click on the Hyperlink in the Associated Ticket Column, this will take you into the detail of the Ticket created for the Facebook message.
      - Once on the Ticket, Select the Tab for Social Interactions (if not available click the Downward arrow next to the Tabs and select from the list)
      - This will allow you to view the Post that was created for the page, any comments made on the post will also appear on the Ticket as part of the thread.
      - The user will also be able to reply to the post or any comments directly from C4S, click on the Edit Button (pencil button)
      - Type your reply in the text box provided and Click on the Send button

      To create content on this Facebook Page, please log onto Facebook using the below credentials.

      (Provided a fake Test Facebook Account that is linked to a Test page)

      XXX XXXXX
      email address: XXXXXX@gmail.com
      pwd: XXXXXXX

       

      Kindly advise.

      Regards

      Brandon

      Author's profile photo m quintin
      m quintin

      Hi everyone, Hi Wendy,

      I followed all the steps that you mentioned in this post but all my requests got unapproved.

      For the App Verification feedback I received this: 

      "Your app's Facebook Login Button is broken

      The Facebook Login button is not currently working in your app. When clicked, the button should immediately prompt a user to log in with Facebook and the user should be able to successfully sign in to their Facebook account.

      Please check that your Facebook Login button is working correctly and accessible outside your company, then resubmit your app for review."
      They attached a screenshot showing my C4 system and the list of social media channels empty, which is normal because I couldn't do "connect channel" because I was missing the permissions from Facebook. Therefore my app could not be added.
      Do you have an idea on how to solve this issue?
      For the other permissions I received this feedback:
      "We were unable to verify the use case outlined in your notes and screencast when we logged in to your app. Here is our recommendation to avoid this problem in the future:
      1. Please check that your app is fully developed and has correctly integrated the requested permission before resubmitting for review
      2. Provide correct test credential to access your app in a test environment/development mode. Development mode allows your app to access permissions with limited test data for complete review
      3. If your app is in live mode you must create a test app for your live app, to create an App Review submission
      4. Please provide correct test URL in your submission notes, which enables us to access the testing environment of your app.

      Also see our App Review introduction video and Common Rejection Reasons guide to learn more about App Review requirements."

      Do you know what we could do here?
      Let me know if you need other information.
      Thanks in advance for your help.
      Morgane