Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
richard_hirsch
Active Contributor
0 Kudos

Yesterday I saw a tweet from Chip Rodgers who was returning from the SAPTechEd in Beijing.



Weibo is similar to Twitter but is largely focused on Chinese-speaking users.  As a measure of its size, one Weibo user has over 14 million followers. Only LadyGaga has more users on Twitter.

I was curious and created a user on Weibo. This act was more challenging than I expected since everything is in Chinese.   I then started to get interested in the Weibo API - unfortunately for me most of the pages were in Chinese.
I also found some other documentation in English. I was surprised to see that Weibo allows OAuth and Basic authentication, so I decided to try and see if I could get it to work.  Examples were based on curl, so it didn’t look that tough.

     curl -u user:passwordhttp://api.t.sina.com.cn/statuses/friends_timeline.xml?source=appkey

I had a user and a password. All I needed was an “appkey”. To get an appkey, I had to register as a Weibo developer. After registering myself as a developer, I had to create an application to get an appkey.  After searching around, I finally got my appkey and tried it out. Success. I was getting cocky. What other experiments might be possible? I remembered an old blog that I had written about integrating Apache ESME into SAP’s OnDemand development platform River and decided to try the same with Weibo.



Here is the River action script that I used. 

var currInput = $CTX.getInput().getRecord();
default xml namespace =  $CTX.collection.getDefaultDataNamespace();
var inputXMLData = new XML(currInput.getData());
var productvalue = inputXMLData.Product.toString().replace(/\n/g,"");
var custname = inputXMLData.CustomerName.toString().replace(/\n/g,"");
$UTILS.log.info(productvalue);
$UTILS.log.info(custname);

var urlString2 = "http://api.t.sina.com.cn/statuses/update.json?source=2103967875&status=Customer++'"+custname+"'+has+a+new+product++'"+productvalue+"'";
$UTILS.log.info(urlString2);

var request2 = $UTILS.http.createRequest(urlString2, "POST");
request2.addHeader("Authorization","Basic aGlyc2NoLmRpY2tAZ21haWwuY29tOkFsYZZZZTIzJA==");
var response2 = $UTILS.http.sendRequest(request2);
$UTILS.log.info("response code is "+ response2.getResponseCode());
$UTILS.log.info("6 is " + response2.getBody().split("\n").join(""));

 

Note: You need to encrypt the “username:password” using Base64. Here is the site that I used to encrypt my authentication details. 

Conclusion

I was fascinated by the idea that there was a whole group of users that many Western (non-Chinese) enterprise software vendors largely ignore.  The social media-related integrations of such vendors are usually focused on Twitter and Facebook.  Twitter integrations in enterprise software are a dime a dozen but I have yet to see a SaaS CRM system integrating Weibo.  

In my opinion, the attitude is very short-sighted. A recent deal between Atos and Ufida has sensitized me to the critical importance of the Asian software market. SAP also sees the importance of this market as revealed by the recent announcement at the Sapphire in Beijing that they are planning to spend 2 billion dollars in China until 2015.

The fact that a Weibo API exists and is similar to that of Twitter would suggest that existing Twitter integrations could probably be easily ported to Weibo. Switching to the new API, however, probably won’t be enough.  Can the current Twitter sentiment analysis tools handle Chinese or Chinese slang?  Do existing assumptions regarding how Twitter users interact with businesses and other consumers apply to the Chinese market?  Are Klout’s assumptions regarding social media influence applicable to China?

China represents an unbelievable opportunity for non-Chinese enterprise software vendors.  The challenge for such vendors won’t be one of technology but rather one of culture.  
6 Comments