Categorized | Adobe, LiveCycle

Twitter Component for LiveCycle ES

Posted on 24 November 2007 by Mark Szulc

After reading a couple of great articles recently I thought I’d give writing a component (or DSC – Document Service Component) for LiveCycle ES a go. For inspiration I read Mike Hodgson’s Devnet walkthrough article on how to build a component and Christoph Room’s sample for integrating LiveCycle ES with Adobe Share.

Twitter Component for LiveCycle ES

Since using the Twitter API has become the modern day “Hello World” I decided to give it a shot. After googling for 5 minutes I found the Think Tank Twitter java interface. A few lines of code and I had my class written ready for LiveCycle integration;

package com.markszulc.lc;
import thinktank.twitter.Twitter;
public class TwitterComponent {
public void UpdateTwitter(String accountid, String password, String tweet){
// Make a Twitter object
System.out.println("****** Updating Twitter!!");
System.out.println("AccountID: " + accountid);
Twitter twitter = new Twitter(accountid,password);
// Set my status
twitter.updateStatus(tweet);
}
}

I then quickly put together the XML component descriptor that tells LiveCycle ES what properties to display in the panel and how to invoke the class, compile and I was done.. all up less than 1 hour from idea to implementation!

Twitter Component Properties

Now anyone can invoke Twitter just by setting a couple of properties!!

Download the Twitter Component for LiveCycle ES here: twittercomponent10.zip

Next stop is to work out how to expose exception handling.. stay tuned for version 1.1..

Related posts:

  1. Twitter
  2. LiveCycle Productivity Kit updated
  3. LiveCycle “next generation” preview release available
  4. Adobe LiveCycle projects on RIAForge
  5. Recent Acrobat / LiveCycle related product updates from Adobe.

6 Comments For This Post

  1. Gary Gilchrist Says:

    Hi Mark,

    I was just trying to write one of these and struggling with lots of weird 3rd party jar files needed by java-twitter. Then I thought, “hang on.. I wonder if anyone out there has already done this?” … very nice job :)

    By the way we’ve got a cool custom component development perspective for Eclipse in the works which makes this sort of thing even easier to build and integrate..

    Gary.

  2. Sven Ramuschkat Says:

    Hi,
    I am using your LC Twitter Component for a nice LiveCycle Rightsmanagement Demo which is http://www.whereismypdf.com

    I programmed a LC Process which is called by an Event RMProtectedDocument and then Twitter is called … but sometimes the Twitter Component makes an Error like this:

    java.io.Exception: Server returned HTTP response code 401 for url http://twitter.com/statuses/update.json

    Any idea?

  3. Mark Szulc Says:

    Hi Sven

    A 401 error means the client wasnt authorised. Are you sure that in the instances where its failing that you are providing the correct credentials to Twitter?

    Mark

  4. Marco Cucinato Says:

    Hi Mark,

    guess that the new oAuth authentication in Twitter is now blocking your component.

  5. Mark Szulc Says:

    @Marco good point. I’ll need to find time to build v2.0.

  6. Mark Szulc Says:

    I finally had a change to sit down and understand Twitter’s oAuth system and have rebuilt the Twitter component. You can download it here;
    http://www.markszulc.com/blog/twitter-component-for-adobe-livecycle-es2-5/

2 Trackbacks For This Post

  1. LiveCycle ES Components - yet another example! « Greg Wilson’s Ramblings Says:

    [...] http://www.markszulc.com/blog/2007/11/24/twitter-component-for-livecycle-es/ [...]

  2. » Building a controlled Twitter solution using Adobe LiveCycle ES Mark Szulc's Blog Says:

    [...] My colleagues from Adobe’s Benelux technical team have come up with another great use case for my custom LiveCycle ES Twitter Component I built some time [...]

Leave a Reply

Photos from my Flickr stream

See all photos

What I'm Doing...

My Photos

Magician Chassis robotUltrasonic range finder on front of robotMagician Chassis robotTest setup of Ultrasonic Range FinderMagician ChassisTest setup of Ultrasonic Range Finder

Google Ads

My mobile site

QR Code - scan to visit our mobile site

This is a 2D-barcode containing the address of our mobile site.If your mobile has a barcode reader, simply snap this bar code with the camera and launch the site.

Who's Online

6 visitors online now

Switch to our mobile site