The Oracle Integration Cloud Service – ICS – comes loaded with a rich collection of Cloud Adapters. These adapters facilitate the integration with SaaS applications and internet services of various natures. These include Oracle SaaS applications (such as RightNow, Eloqua, ECommerce Cloud, ERP Cloud, HCM Cloud), on premises ERP applications (SAP, EBusiness Suite, Siebel) and assorted third party applications such as SalesForce, Facebook, Google Mail and Task, LinkedIn and Evernote. Through these adapters, interacting with said applications and services becomes a simple, declarative operation instead of a custom programming effort.
In this article, I will use the Twitter Adapter to create a connection to a Twitter Account (leveraging the Twitter API under the covers). The Twitter Adapters exposes over a dozen operations. I will use just the operation to publish a message (aka Tweet) in this example. From ICS, I will expose an integration through a simple REST connection. This allows trusted consumers to publish Tweets in a very easy way – leaving the authorization details and the API intricacies to ICS.
The steps I went through:
- Grant access to [ICS Connection] app in the Twitter developer page and generate API Key and Consumer Key
- Create a new ICS Connection based on Twitter Adapter; set up the API Key and Consumer Key
- Create an ICS REST Connection (to expose)
- Create an integration – between REST Connection as inbound (source) to Twitter Connection (as outbound destination); configure the endpoint (inbound) and operation (inbound and outbound)
- Create the mappings for request and response
- Define the tracking – business identifiers
- Activate the integration
- Test the exposed REST connection from any REST client, for example SoapUI, to Tweet a message through a simple REST POST call
Most of these steps are explained by the screenshots you will find below.
One step I did not have to through because the certificate already had been set up on my ICS instance is uploading Twitter’s security certificate (see in ICS docs: Uploading the SSL certificate and on Twitter: https://dev.twitter.com/overview/api/tls ). At the end of the article, you will find what I believe the steps should be in cases where this certificate is not already set up.
Grant access to [ICS Connection] app in the Twitter developer page and generate API Key and Consumer Key
Go to the Twitter developer page at https://dev.twitter.com and follow the instructions in the ICS documentation.
Create a new ICS Connection based on Twitter Adapter; set up the API Key and Consumer Key
Create an ICS REST Connection (to expose)
Create an integration – between REST Connection as inbound (source) to Twitter Connection (as outbound destination)
And the destination:
Pick the operation in the Twitter API that is to be invoked:
Create the mappings for request and response
And the response mapping:
Define the tracking – business identifiers
Activate the integration
Find the exposed endpoint:
Test the exposed REST connection
from any REST client, for example SoapUI, to Tweet a message through a simple REST POST call
Note: basic authorization has to be provided using valid ICS credentials
And verify in the Twitter web client:
Verify the monitoring in ICS:
Uploading an SSL Certificate
Certificates are used to validate outbound SSL connections. If you make an SSL connection in which the root certificate does not exist in Oracle Integration Cloud Service, an exception is thrown. In that case, you must upload the appropriate certificate. A certificate enables Oracle Integration Cloud Service to connect with external services. If the external endpoint requires a specific certificate, request the certificate and then upload it into Integration Cloud Service.
One way to get hold of the certificate is through the browser – for example Google Chrome:
And upload in ICS:
See in ICS docs: Uploading the SSL certificate and on Twitter: https://dev.twitter.com/overview/api/tls
ICS Documentation on Twitter Adapter: https://docs.oracle.com/cloud/latest/intcs_gs/ICSTW/toc.htm
Twitter developer page at https://dev.twitter.com.
4 thoughts on “Leveraging the Twitter Adapter in ICS – Tweeting through Oracle Integration Cloud Service”
Can we Tweet an image using the Twitter Adapter because Tweet Opertaion doesn’t have a field/element to send Image
Thanks for the detailed explanation but wanted to know can we tweet an images along with message using ICS. Could you please explain this.
Hi LUCAS JELLEMA,
Thanks for the detailed explanation. I have tried this example in ICS, But the exposed rest service is not being called when I trigger from SOAP UI. There are no instances in tracking. I have uploaded Cert to ICS. Could you please help me on this.\
Hi Subbu, When you call the endpoint with SOAPUI, replace ‘metadata’ with ‘tweets’.
Comments are closed.