Posted by Sandro on December 19th, 2009

Tweetr Tutorials – Part 2: Using OAuth in Tweetr

I’ve just finished uploading the second video tutorial to Vimeo on how to use Tweetr – The AS3 Twitter Library. In the second installment of this series i will show you how to use OAuth in Tweetr.


Using OAuth in Tweetr from Sandro on Vimeo.

You can grab the Project Sourcecode here.

If you want to watch the video in the size it was intended for, go to the Tutorial Page on the Project Homepage.

Related Posts
Post a Comment


10 Comments »

  1. Phil says:

    Excellent tutorial, Sandro. Very clear and helpful. Thank you for this and the tweetr library.

    Phil

    comment-bottom
  2. Phil says:

    One question: I’ve seen Flash apps/widgets where users can log into twitter by just entering their username and password. Is this using OAuth and just hiding the back and forth interactions, or is this done with another method? Tinker has a widget that does this, for example, and it is a very smooth login process.

    Thanks,
    Phil

    comment-bottom
  3. Sandro says:

    Hi Phil,

    Actually what you are referring to, is Basic Authentication, while tweetr supports this, it’s not the preferred way of doing user authentication anymore (less secure) since twitter is planning on disabling it in the near future.

    comment-bottom
  4. Marc says:

    Does Tweetr work for web based applications too? If so, do you have any tips handy to omit entering the pin-code manually?

    comment-bottom
  5. Chris says:

    I have followed this tutorial down to the letter and have had success obtaining all of the tokens required. However, when I try to make the tweetr.updateStatus(“Hello from my app”) call, nothing happens on my Twitter test account.

    The TweetEvent.COMPLETE event fires and traces out the trace(“update should be made”), but when I trace out event.data in the same place, it gives me back HTML that says “this page does not exist”.

    All the proxy files have been uploaded and everything was done according to the tutorial.

    Please help.

    Thanks

    comment-bottom
  6. Kevin Fox says:

    Thank you for the demonstration. I got it to work fine, but when I showed in to my project manager, he said the user experience was bad considering the user needs to paste in a PIN. Can you offer a non PIN example? I know it is possible to skip the copy and paste step, and some people use a shared object to store some info that makes the authentication process even smoother. Any advice for me on how to get this done? I like and want to keep using the tweetr lib since I use it in the app for other purposes and the documentation is great. Thank you for offering a great lib. Unfortunately I may not be skilled enough to merge this code with a version like this… http://soenkerohde.com/2010/01/twitter-as3-oauth-lib-with-flex-4-example/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+soenkerohde+%28S%C3%B6nke+Rohde%29

    comment-bottom
  7. pg says:

    hello & thank you for your tutorial, could you please clarify about the storage of the 4 params

    example1. It seems to imply that a web app storing those 4 params on its own server would be able to publish on one single twitter account all the time, for any user that logs in and clicks publish

    How I understand the flow [should be]:
    1. Allow twitter app for a user and then store somehow pairs user:pin
    2. user logs in my web app (get twit user name(how?) => if have pin only do the second auth for the token, if not do the whole auth process

    I would appreciate if you or anyone have any thoughts on this. The goal is to implement a “connect to Twitter” button as described in this oAuth flow pattern:
    http://dev.twitter.com/pages/sign_in_with_twitter

    comment-bottom
  8. jung says:

    hello
    thank you for your tutorial.
    I’m korean.

    tweetr.updateStatus(str);

    vars.status = strEscape(status.substr(0,140)); –> error ! message( Fail : Incorrect signature )

    vars.status = encodeURIComponent(status.substr(0,140)); –> ok !

    encoding error.
    Please help.

    comment-bottom
  9. hello thank you for your tutorial. I’m korean. tweetr.updateStatus(str); vars.status = strEscape(status.substr(0,140)); –> error ! message( Fail : Incorrect signature ) vars.status = encodeURIComponent(status.substr(0,140)); –> ok ! encoding error. Please help.

    comment-bottom
  10. JimiB says:

    Thank you for putting together such a clear tutorial, it makes no assumptions of previous knowledge/experience which was great as I understood very little before now. You Sir, are a gent.

    comment-bottom

RSS feed for comments on this post | TrackBack URL

Leave a comment

Flash Flex Actionscript Tutorials Tutorial AS2 AS3 AS1 Feeds MXML Blog Zinc AIR Launcher Twitter Tweetr Yet Another Coverflow Liip Adobe Macromedia PHP MySQL PostgreSQL XML AMF MXNA Phidgets Schweiz Switzerland Suisse Svizzera Fribourg Freiburg Aargau Baden Publicis Accessibility JAcc Qt FOSDR Flash on the Beach Forum Conference Speaker Speaking Talk