Technical Articles
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:
- You sign into your app’s dashboard, click App Review then click Permissions and Features.
- Search for manage_pages, publish_pages, request both of them.
- 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.
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
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
Hi Wendy!
yes, the issue was with verification type. We resolve it deleted me in FB App on FB side.
Thank!
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
Hi Carles,
The issue description is too general for me to understand the real issue here.
At the same time, please confirm the following:
Would be great if you could report an incident is the issue is not resolved.
Regards,
Wendy
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.
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
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.
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
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-->
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
Hi everyone, Hi Wendy,
I followed all the steps that you mentioned in this post but all my requests got unapproved.
"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.
Also see our App Review introduction video and Common Rejection Reasons guide to learn more about App Review requirements."