Skip to Content
0

Facebook Campaign and OAuth authentication

Jun 07, 2017 at 01:52 PM

827

avatar image

Hi everyone,

We are running SAP Hybris Marketing 1702 on premise and currently trying to setup the Facebook integration with our system. The setup is done according to the integration guide page 21 ff:

Before clicking the authenticate button within the facebook campaign the output of "OA2C_GRANT" is as following:

When I now open a new facebook campaign the popup appears "to create a campaign, authenticate with Facebook Ads". After confirming with a click on the authenticate button the redirect to "https://ourserver:port/sap/bc/ui5_ui5/sap/CUAN_NAV_TO/index.html#CUAN_TI_F_INI_MKT_AUTOMATION_ENDPOINT?sap-client=100" is executed with the following message:

After closing the window and refreshing the facebook campaign or when creating a new facebook campaign the system is still asking for authentication.

However when we refresh the Oauth 2.0 Cleint accounts from above I can see the following:

A token seems to have been assigned. But for some reason hybris marketing seem to be unaffected from it.

Could anyone please assist on how to troubleshoot this issue?

Regards Christopher.

01.png (61.8 kB)
02.png (14.6 kB)
03.png (3.4 kB)
04.png (16.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
avatar image
Former Member
Jun 08, 2017 at 09:16 AM
0

Dear Mr. Günther,

another point which just came to your mind: Have you implemented the latest notes for the Facebook integration? Eg. 2470543 - Facebook Integration V2.9. [Background here is that Facebook regularly changes their marketing API (couple of times per year).]

Kind regards

Svend Domdey (Hybris Marketing Development)

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Svend,

implementing note 2470543 seems to have solved the problem. Thank you very much for your support!

Regards Christopher.

0
Former Member
Christopher Günther

Hi Christopher,

good to hear. Hope you can go for productive usage soon.

Regards

Svend Domdey

0
Former Member

Hello,

check SAP Note 2515959 which will update the Marketing API to V2.10.

Regards

Dominic

0
avatar image
Former Member
Jun 09, 2017 at 08:05 AM
1

Hi everyone,

regarding the SAP Hybris Marketing Facebook Integration (especially OAuth) I can recommend the following troubleshooting and tools.

1) Did run trough all steps of the SAP Hybris Marketing Installation/Integration Guide for Facebook Integration? Go to help.sap.com and search for Hybris Marketing

- SAP Hybris Marketing Cloud: https://help.sap.com/viewer/p/SAP_HYBRIS_MARKETING_CLOUD --> Section Integration

- SAP Hybris Marketing (on premise): https://help.sap.com/viewer/p/SAP_HYBRIS_MARKETING --> Section Integration --> view all --> Integration Guide

2) Is your Facebook App already reviewed? The app must be reviewed by Facebook

3) Check that you have set up an ad account in Facebook:www.facebook.com-> (settings on right top corner)

) Run Authentication Button from SAP Hybris Marketing UI and check for errors in the URL in the browser address bar of the target endpoint (or even in the browsers console) - if error messages occur then check the http log via transaction smicm -> go to -> trace file --> display all)

On premise only:

4) Did you install all necessary SAP Notes so that your Hybris Marketing matches your Facebook Apps version (on premise only)?

5) Run Authenticate from the transaction oa2c_grant and check for errors in the url address bar of the target endpoint (or even in the browsers console) - if error messages occur then check the http log via transaction smicm -> go to -> trace file --> display all)

6) Try to cal lhttps://www.facebook.comwith a get request from /IWFND/GW_CLIENT

7) Double check the http log transaction smicm -> go to -> trace file --> display all) check for error related to Facebook

Errors regarding Facebook Integration which might occur in http log or gateway client:

- HTTP Receive failed: SSL handshake with graph.facebook.com:443 failed SSSLERR_PEER_CERT_UNTRUSTED

--> Import right certificate used by Facebook to the system

-NIECONNECtiON failed:

--> Check and correct setup of proxy settings needs to be clarified by customer IT

-Authentication Flow stops in Facebook "redirect URI problem" --> maintain in the app the redirect uri

--> concatenate redirect uri manually like stated in the integration guide/application help (for on premise look up of redirect uri in oa2c_config) and copy to Facebook app --> settings --> advanced --> Valid OAuth redirect URIs

- http Connection failed: proxy --> check proxy setting and white list (filter) e.g. add host as filter to whitelist to bypass proxy

8) In case you use custom audiences. Did you accept the Facebook terms and conditions for custom audiences?

Check the link. (In case you did not accept the terms and conditions you should see an info "You have accepted these terms of service") - Check that you choose the right ad account on the left-hand side

https://www.facebook.com/ads/manage/customaudiences/tos.php?_=_

If the link is not working you can check manually:

https://www.facebook.com/policies--> Ads --> Targeting --> applicable terms - Check that you choose the right ad account on the left-hand side

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Michael,

trying to authenticate I get the error message:

When I clear the browser cache it leads me to the facebook login page for one time. Logging in I get the same error again and after that I get it everytime I click the authenticate button in the facebook campaign (until I clear the browser cache again, then it works again for one time).

Checking the SMICM it seems like there are some problems with the certificate although I've imported the certificate from facebook.com correctly in the STRUST.

Here's a part of the Trace:

Do you have some other idea what I can do to enable the communication?

Regards, Tobias

0
Former Member

Dear Tobias,

This error message tells you that "SAPSSLA.pse" which is your SSL Client(anonymous) in transaction STRUST, does not trust *.facebook.com. Did you load the facebook certificate into STRUST as following:

with regards,

Akil

sapssla.png (45.8 kB)
0
Former Member

Hi Experts,

What will be Domain URL to enter in APP for Hybris Marketing Cloud? I have formatted URL as per below format:

URL format: https://host:port/sap/public/bc/sec/oauth2/client/redirect?sap-client=100

I am receiving below error while doing authentication:

"Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings."

Thanks and regards,

Dinesh.

0
Christopher Günther Jun 08, 2017 at 08:12 AM
0

So I tried Google Chrome instead of IE and there the redirect works fine. I get a shot notification that the authentication was successfully.

However, right afterwards a error message pops up:

The full error message is:

{
   "error":{
      "code":"CUAN_MARK_ORC_EXEC/129",
      "message":{
         "lang":"en",
         "value":"There was an issue with request parameters: Code                                               400, message 'Bad Request'."
      },
      "innererror":{
         "application":{
            "component_id":"CEC-MKT-EXP",
            "service_namespace":"/SAP/",
            "service_id":"CUAN_CAMPAIGN_SRV",
            "service_version":"0001"
         },
         "transactionid":"843E40F111460090E005923B5993182C",
         "timestamp":"",
         "Error_Resolution":{
            "SAP_Transaction":"",
            "SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)",
            "Batch_SAP_Note":"See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)"
         },
         "errordetails":[
            {
               "code":"CUAN_MARK_ORC_EXEC/129",
               "message":"There was an issue with request parameters: Code                                               400, message 'Bad Request'.",
               "propertyref":"",
               "severity":"error",
               "target":""
            }
         ]
      }
   }
}

So I am a little further but I am still stuck.


05.png (13.5 kB)
Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi,

We have exactly the same error - what was the resolution?

0

Hi Alec,

please refer to the answer given by Svend to implement SAP note 2470543. That solved the problem for me.

Regards Christopher.

0

We have exactly the same error and we have implemented SAP note 2470543 also But we are getting same error

0
avatar image
Former Member
Jun 08, 2017 at 09:02 AM
0

Dear Mr. Günther,

at first glance, this error is originating from the call to Facebook when the Hybris Marketing system tries to read the list of available ad accounts and objectives for your Facebook app. We have seen cases where such an error was returned from Facebook because the terms and conditions for the Marketing API have not been confirmed in the Facebook app.

If this is not the case, I would kindly ask you to open a customer incident for this on component CEC-MKT-INT-FBI so that we can have a closer look into this.

Kind regards

Svend Domdey (Hybris Marketing Development)

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Svend,

thanks four your support. We created a demo facebook (FB) profile + developer account and app for a POC. The app is not yet public but still in development status. In the "Basic Settings" of the app I entered a url for TOC and privacy statement. I am not aware that I could anywhere else confirm any terms and conditions as mentioned in your reply. If you have any hint where to do that please let me know.

Regards Christopher.

0
Former Member
Christopher Günther

Hi Christopher,

here are some ideas for checking:

- Have you added the marketing API to your app (listed in "Products" or similar)? When doing that, the terms and conditions need to be confirmed.

- Are there any ad accounts for your app?

- Have you checked if you can perform any requests to the Marketing API using the Graph explorer? Eg enter "me?fields=adaccounts{users{permissions,role},name,account_id},id" on https://developers.facebook.com/tools/explorer/

Kind regards

Svend Domdey

0
avatar image
Former Member
Dec 08, 2017 at 10:19 AM
0

A summary of the troubleshooting for SAP Hybris Marketing Facebook Ads Integration as SAP Note

2574247 - SAP Hybris Marketing Facebook Ads Integration Trouble Shooting Guide

https://launchpad.support.sap.com/#/notes/2574247

Issues like client not on latest the API Version, Facebook App, OAuth, Authentication Errors, Authentication Flow not working, no ad accounts displayed, Facebook Custom Audience terms and conditions not accepted and others are covered.

Share
10 |10000 characters needed characters left characters exceeded