Skip to Content

In SAP HCI – Facebook Integration – Part 1 we saw how to obtain Facebook Connectivity artifacts and add it to SAP HCI Secure Parameters. In this blog I will show how to configure Facebook adapter to read post and comments.

Integration Flow

I have developed a simple Integration flow to be triggered every one hour. The Request-Reply service call branch will invoke Facebook endpoint and send the Message body as email.


Get Posts Endpoint Configuration:

This producer endpoint will return posts(/feeds) from a User or Page. In the example I will show how to read feed from a User page. Configure the receiver channel as below.

1. Choose Endpoint as Get Posts.

2. User / Page ID: This parameter is filled with the User ID copied from the App created in previous blog Step-6.

3. OAuth Settings parameters in the channels will refer the Secure Parameters artifact names created in the previous steps.



This service call returns result as facebook4j.ResponseList<facebook4j.Post> object as message body.Below is an example payload from demo scenario.


This above message response can be read using a Groovy Script which I will cover in next blog.

Get Post Comments Endpoint Configuration:

This provider endpoint will retrieve all the comments of requested post. It requires a Post ID as Channel Parameter which is retrieved in Get Posts producer endpoint. Below is receiver channel configuration.

1. Select Endpoint as Get Posts Comment.

2. Set the Post ID. (Note: In next blog we will see how to read from facebook4j.Post using Groovy Script and set in the channel)

3. OAuth Settings parameters in the channels will refer to the respective Secure Parameters artifact.


(Note : For Demo purpose Post ID is hard coded to read the comment using the same Integration Flow)

This service call returns result as facebook4j.ResponseList<facebook4j.Comment> object as message body. Below is an example payload from demo scenario.


To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member


    Looks like FB took away user_posts from out of box permissions.

    Can you please check if your integration is working as is ?


  2. Former Member

    Hi Santhosh,

    You mentioned in the next blog, you will show how to read from facebook4j.Post using Groovy Script and set the PostID in the channel, but I could not find this blog yet.

    Currently we are facing problem to dynamic assign PostID to Facebook Adapter, could you kindly provide relevant document or share an example? Thanks so much.

    Best Regards



Leave a Reply