
UPDATED: Tweetr has gotten an Update since this blog post. See this blog post for more infos.
While i was developing Twidget , i started building up a AS3 Library for using the Twitter API, since the only other library i found seemed a bit painful to use.
So after taking some additional time to generate all the needed methods, data objects and inline documentations, i am happy to announce that “Tweetr” is available for public consumption over Googlecode :).
Features:
Since twitter has a very restricted crossdomain policy, at the moment, tweetr can only be used for AIR/Zinc or Launcher Applications since they have ways to circumvent the Crossdomain problem.
I will be working on a simple php wrapper class that i can include with tweetr so you could use it for website integration. If you are interested in Tweetr’s future, there is also a small Roadmap up on the Wiki pages.
Nothing left to say than go and grab it while it’s hot:
Wow! amazing! But i can’t really figure out the API just yet. When are the examples coming?
I tried making a Tweetr and do a sendTweet but for now it had no results. I’m really excitedabout this!
Hi Kjelle
I will be releasing examples as soon as i’m done with the PHP Proxy for Tweetr which will be part of the next release. I expect this to be within this or next week.
Keep in mind that Tweetr at the moment only works for AIR Applications and/or other similar runtimes like Zinc or Launcher since twitter has a rather strict crossdomain policy.
Either way, you can try the following example from within Flex or Flash and run it, since the sandbox doesn’t act up within the IDE’s. So, that said, here’s the example on how to use sendTweet:
When your request succeeds, the handleResult Method will receive a TweetEvent containing a StatusData within the responseArray.
That StatusData Object will be equal to the tweet you just made. Which is the exact same behaviour as defined by the actual twitter rest api.
Hope this helps to get you started.
Waauw thanks for the quick answer. I’m gonna try it right now. I was searching for an easy twitter library for my current adobe AIR project. So I’m really happy that I found Tweetr, it seems like the perfect solution to my problem.
I’m looking forward to seeing this project evolve.
Thanks man :)
Just tested it and it works just fine. Thank you so much! I’m gonna play around with all the other stuff you’ve implemented.
Thank you !
Hi Sandro,
Thanks for nice code library. However, can you tell why some POST methods don’t work?
For example, friendships/destroy method seems don’t work. However, it is seen in your library.
Also, another point:
I’ve launched your example code posted above in Flash IDE and got following:
Error opening URL ‘http://xxxxx:yyyyyy@twitter.com/statuses/update.xml’
Tweets failed!
Where xxxxx and yyyyy is actual username and password.
What should I do have your example working?
Looking forward to your answer!
Thanks!
Thanks for great library! It works in AIR very well. Thank you!!!
Hi Igor
when you use the Libary for a simple Flash IDE Project you might have to upload the compiled swf to a server to actually get it working. Seems that the connection gets blocked through the Flash IDE for most people.
Hi Sandro
Awesome work! I have run into a problem and have a feeling that it has to do with server setup. I continuously get the Authentication Required window from the browser whenever I am looking to do something that requires a username and password.
I am able to populate a datagrid just fine when accessing the public timeline, so I know that the proxy is working OK.
Any thoughts?
Thanks in advance,
Sean
Hi Sandro,
Awesome job man. I tried using it in my local machine for a Flex web application. There’s no response returning.
1. How do i proceed ?
2. How come your example is working fine on the web ?
3. Can i use the PHP proxy to make my application work fine with the Tweetr API ? If Yes, kindly guide me.
Pls reply. Thanks in advance.
Hi,
I’m using this library for a work project and it works great when I run it from Flex, but as soon as I try to deploy it anywhere I get a flash security error: Error #2156: Port 1 may not be accessed using protocol http.
at flash.net::URLStream/load()
at flash.net::URLLoader/load()
at com.swfjunkie.tweetr::Tweetr/getUserTimeLine() Tweetr.as line 295
Setting browserAuth to false solved the problem. The comments in the source code say that this only needs to be set to false for AIR but apparently that’s not the case.
Hi Nate,
Can you shed some light for my problem here.
Please share the code sample if any.
http://blog.swfjunkie.com/2009/03/open-sourced-tweetr/#comment-117
Thanks in advance.
Hey Sandro,
First of all I just want to say amazing work! I am learning a lot from it. I got a couple of questions man… I am making a FLEX application that shows the latest tweets depending on a keyword, the idea is that the app updates actumaticall, like updates in runtime.
So, Im using a Timer, that launches an event every 5000 miliseconds, and every time that event fires I refresh a data grid with the response array returned by the search method of your class. But its not behaving well.. sometimes it updates instantly and anothers not… Ill appreciate any help.
Thanks in advance
Hi Sandro,
I try to implement simple application using library. I am getting this error.
Error #2048: Security sandbox violation:
can you please help me to find out what will be wrong?
Regards,
Alpesh
Hey,
ähm your API is great – no qestion. But since you update it, it doesn’t work with air?
greets, nico
Hey Sandro – thank you for all your hardwork – I’m sure it’s no easy task trying to support this. It’s a cool API.
I’m having huge troubles with the Proxy script. I can point to your servistHost and run authenticated getUserTimeline, but when I try to use the proxy script on my server, it fails. But the proxy script works on my server if there is no auth required (like on getPublicTimeline() method). Have you updated the proxy php script or has something changed on Twitter’s end?
Exactly what I needed. I have one question though:
Will there be any Twitter “Nearby” support in the future?
This would allow a similar feature to Tweetie 2 where you can see people who tweet near you.
Thanks,
Dan