The contents of this paper are not subject to any license agreement with SAP. The concept / code outlined below is not intended to be binding upon SAP to any course of business / product strategy and / or development. This is subject to change and may be changed by SAP at any point in time. SAP assumes no responsibility for errors or omissions in this document.
For people who have seen my previous posts and have followed upon to view the Twitter Integration Posts by Venky or viewed the Ecohub package, the next set of questions that they ask is:
- How can I actually read twitter feeds from within my ABAP system?
I attempt to present a very simple way to achieve this. It is definitely not production quality in design or implementation, but does serve to showcase what can be done. The following steps below outline the process of getting data from twitter:
- Define the search URL
- Create an HTTP Client connection and authenticate
- Process the result of the call
1. Define the search URL
Let us take an example, say you want to search twitter for SAP. The relevant Twitter API (which can change) is: http://search.twitter.com/search.atom?q=SAP
This creates an ATOM Feed as a result. (You can directly test this in a browser).
2. Create an HTTP Client connection (zcl_twitter_access=>call_url(…) and authenticate
3. Process the result of the call to get an XML
So, now you have the data from twitter. What do you do with it? Use your imagination, there can be several applications that you can build from reading twitter feeds:
Analyze the tweets
I could go on about the architecture of ICM and how this works internally from SAP BASIS if you like, but that is something that is a subject for another day…