Go back to ICS (it will still be open in the previous browser window). Your LinkedIn Connection is configured properly.

Click on Save, Test and Save to complete the connection.

Create a REST connection in ICS

In this section we are going to create a very simple REST connector that will allow us to integrate into LinkedIn via the LinkedIn connector that we just created earlier.

Note: This is a generic REST connector. If you have already completed the other blogs around how to build an integration to either Facebook, LinkedIn, Google Calendar, etc. Then potentially you can simply reuse that REST connector. If not, feel free to create one and enter a different name.

Log into ICS and go to Connections.

Click on “Create New Connection” – This time select REST adapter.

Enter a name for your REST adapter. In my case, I’m calling it “s2v-iia-rest-msg-connector”

In this case, I just want it to trigger my post, so I select just Trigger.

Enter a description if you want. Then click on Create

Enter an email if you want.

We are not setting any security for now.

Click Save and then Test. Ensure you get a green 100% status. Click save again and “Exit Connection“

Congratulations, you have created two connectors! One LinkedIn connector and one REST connector. In the next section we are going to build an integration between them.

Post a message in your LinkedIn account using a REST API via ICS

In this section we are going to create a very simple integration to Post a message to my LinkedIn account. We will expose this as a REST API using both connectors that we built previously, the LinkedIn and REST connectors respectively.

Log into ICS if not already there

Go to Integrations.

Click on “Create New Integration”

For now, let’s just create a simple mapping. Select “Basic Map Data“

Enter a name for your Integration. In my case, I call it “s2v-iia-rest2ln-integration“

Enter a description if you want and then click “Create“

You will get a clean integration.

On the right, find the REST connector that you built earlier. If you have many, you can enter part of the name at the top and the list will be filtered.

Once you have your REST adapter on the list of connections, drag and drop it to the “Drag and Drop a Trigger” section

It will open the REST connector configuration wizard.

Enter the following information:

What do you want to call your endpoint: LinkedInPostMessage

What does this endpoint do? This endpoint will receive a message and send it to LinkedIn adapter, so that it creates a new post

What is the endpoint’s relative resource URI? /social/linkedin/message

What action does the endpoint perform? POST

Configure a request payload for this endpoint: Ticked

Configure CORS (Cross Origin Resource Sharing): Ticked

Click Next.

Select the Request Payload Type: JSON

Click on the <> link and enter a JSON format as you wish to send your POST body payload. Something like:

{“message”:”message”}

Then, click OK.

Leave the Media Type to JSON, and click Next.

CORS Configuration – Allowed Origins: *

Click Next. For the summary, review all and click Done.

That’s it, we have configured a REST Trigger, as part of this integration.

Now, search for your LinkedIn connection and drag and drop it into the “Drag and Drop an Invoke” droppable area.

It will show you the LinkedIn connection wizard. Enter a name and description.

Click Next. Select “Status Update” from the allowed Operations – This will allow update status on the user’s LinkedIn timeline. For example, when the user writes something on their timeline. Then click Next.

Review the Summary and click “Done“.

s

The integration should look like this:

Click on the Map in the middle and then click +

In the mapper drag the message element under “request-wrapper” into the target comment element.

Notice that the structure within “request-wrapper” is the one that you defined when creating freely the JSON payload that you are expecting as input. Pretty cool huh?

For Visibility > Code, LinkedIn allows the following codes: anyone and connections-only – In this case we are going to enter “anyone” manually, as we always want everybody to see our updates in LinkedIn.

For this click on the code link and enter the word anyone as shown below (No quotes):

Click Save. This will close the window and bring you back to the Mapping window. It should look like this:

Click Save on the Mapping window

Exit the mapper. The integration should look like this:

Click on “Tracking”

Drag and drop the campaign (id) element under “request-wrapper” into the Tracking Field

Save your integration.

Notice that it shows a warning because we don’t have any response and fault. In a real scenario we would configure those, but we didn’t select it in this example for simplicity purposes.

Exit the Integration. Notice that your integration is still to be “Activated”

Click on the green “Activate” label on your adapter.

Select to Enable tracing and click Yes.

Congratulations! Your integration is complete.

Click the “information” icon for your integration and copy the Endpoint URL

Since I am using a test environment, the Endpoint is not connected to the Public Cloud, if you click on it will open up a broken link. If you are using your own ICS account, you will not experience this situation. However, let me tell you how I fixed mine… I just removed the “ics/faces/null/” bit from the URI.

Notice that it will show you the Metadata descriptor of your REST API endpoint, for example, the Accepted Media Type, A JSON request sample, Allowed methods, CORS configuration, etc.

Use POSTMAN, SOAPUI or any other REST Test client to send a REST POST command. In this case I am using SOAPUI.

In order to get the Endpoint URL, copy the link below and remove the last bit from “metadata”. Then just copy the API that you designed, you can copy it from the metadata page. In this case: “/social/linkedin/message”

The last bit in red represents the actual URI of your API created in ICS.

Make sure to change the method to POST and in the body enter the POST body payload in the structure that you created as part of the ICS integration. You can also copy the entered JSON sample from the metadata page:

Click the green icon to send the request. You will receive a 202 Accepted response – See that as Raw

Finally, confirm that you see the update went through. A nice way to do it is by asking your LinkedIn’s accounts friends. For example, in this example I used a LinkedIn account of “Barack Dorman” and since I am a friend of his, I can see his update on my mobile:

Share this:

Like this:

LikeLoading...

Author: Carlos Rodriguez Iturria

I am extremely passionate about people, technology and the most effective ways to connect the two by sharing my knowledge and experience.
Working collaboratively with customers and partners inspires and excites me, especially when the outcome is noticeable valuable to a business and results in true innovation. I enjoy learning and teaching, as I recognise that this is a critical aspect of remaining at the forefront of technology in the modern era.
Over the past 10+ years, I have developed and defined solutions that are reliable, secure and scalable, working closely with a diverse range of stakeholders. I enjoy leading engagements and am very active in the technical communities – both internal and external. I have stood out as a noticeable mentor running technology events across major cities in Australia and New Zealand, including various technology areas such as, Enterprise Integrations, API Management, Cloud Integration, IaaS and PaaS adoption, DevOps, Continuous Integration, Continuous Automation among others.
In recent years, I have shaped my role and directed my capabilities towards educating and architecting benefits for customers using Oracle and AWS Cloud technologies. I get especially excited when I am able to position both as a way to exceed my customers’ expectations.
I hold a bachelor degree in Computer Science and certifications in Oracle and AWS Solutions Architecture.
View all posts by Carlos Rodriguez Iturria

Blogroll

RedThunder.blog and contributors. All Rights Reserved. The views expressed in this blog are our own and do not necessarily reflect the views of Oracle Corporation. All content is provided on an ‘as is’ basis, without warranties or conditions of any kind, either express or implied, including, without limitation, any warranties or conditions of title, non-infringement, merchantability, or fitness for a particular purpose. You are solely responsible for determining the appropriateness of using or redistributing and assume any risks.

Follow Blog via Email

Enter your email address to follow this blog and receive notifications of new posts by email.