Twitter AS3 OAuth Lib with Flex 4 example

I have build a little Twitter AS3 library which handles Twitter OAuth authentication and let’s you update your Twitter status. The lib basically uses the OAuth AS3 lib and should be a good example how to use the actual OAuth lib.

This is still basic functionality but since it’s open source someone may fork and extend it. To get a simple idea of the current feature-set have a look at the ITwitter interface.

Further I have build a simple Flex 4 example AIR app which shows things in action. The only thing you need to do upfront is registering a Twitter app to obtain an OAuth consumer key and secret which you have to add to the example:

BTW: You maybe have already granted access to your Twitter account for some apps which you can check here.

7 comments to Twitter AS3 OAuth Lib with Flex 4 example

  • Sonke
    Great post!
    For a personal project I am building an AS3 only web based Twitter search and client application. According to Twitter’s FAQ, they recommend using Oauth moving forward as a means of authentication. But from what I’ve seen, 3rd party libraries (Tweetr, twitterscript, SWX) don’t yet implement OAuth. Are you aware of any objective comparison between the various Actionscript Twitter libraries available? You mention that Twitterscript ‘The API is not really my taste ‘, could you elaborate on that a bit? As a newcomer to the Twitter API just trying to get a handle on which approach makes sense for my needs…Thanks!

  • Twitterscript does not use OAuth and I didn’t like the API design though. However, this is of course personal taste.
    Regarding search I don’t have anything to recommend, sorry.

  • Hi Sönke
    Apparently I am missing “airspark.swc”, as I get the error message ‘Unable to locate specified base class ’spark.components.WindowedApplication”
    I downloaded and am using the latest nightly build of the sdk but still no luck…can you help?

  • Are you building a web app or air (desktop)?
    If you are using Flash Builder you should enabled “Include AIR libraries”.

  • got it, thanks!! at least no compile errors. I’m not ‘bleeding edge’ in terms of flex and want to get your Twitter library working in Flexbuilder3, as3 only. So I assume I at LEAST need the 3 following
    1-your Twitter package at com.soenkerohde.twitter
    2-as3corelib.swc
    3- Your OAuth package at flaircode.oauth (I need to modify OAuthLoader since it references mx.core.UIComponent)

    But not sure about the oauth-as3.swc which contains the com.hurlant and org.iotashan packages.
    Will this swc work for a Flexbuilder3, AS3 only project?
    Am I missing something?
    Thanks again for a great resource!

  • The example is made for Flex 4 so I would encourage you to try out Flash Builder 4 beta 2.
    Then you only need to compile my twitter lib and add the swc to the project.
    Sorry, but don’t have the time to run you through with Flex 3.

  • Sönke
    Got it working AS3 only!
    Again, thanks, your example is really awesome!

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">