AS3 and Twitter, frustrated

9 views
Skip to first unread message

Sam Wilson

unread,
Jul 16, 2008, 11:00:23 AM7/16/08
to Twitter Development Talk
I've been looking for what seems like an eternity to find out a way to
create a simple as3 example that does the following:

- Gets all of my twitters
- Can work without the assistance of PHP or some other proxy
- Can be tested locally (axiom of above)
- Doesn't need to use a Twitter-specific data format but can use JSON,
XML, or something main stream

Also... I don't understand why so many people point to this:
http://twitter.com/help/api ... I looked for as3 files but just got a
bunch of links to other, similarly vague pages. I'm starting to think
as3+twitter is my Sasquatch, tormenting me until I cry like a huge
baby man.

Why!!???


:)

Thx,
Sam

Ed Finkler

unread,
Jul 16, 2008, 11:27:48 AM7/16/08
to twitter-deve...@googlegroups.com
Without specific questions, no one can really help you. As it is,
you're basically asking (intentionally or not) "I need this stuff,
tell me how to do it." I don't think most folks here have time to
address such a broad question. 8)

--
Ed Finkler
http://funkatron.com
AIM: funka7ron
ICQ: 3922133
Skype: funka7ron

Sam Wilson

unread,
Jul 17, 2008, 7:44:46 AM7/17/08
to Twitter Development Talk
Ed, good point :) My goal is to program is a non-fancy twitter
badge for my blog that has my latest twit. Questions:

1. Where to get the as3 Twitter API files? (not in downloads)
2. How does app authenticate itself? (putting user/pass in as3 code
seems very unwise!)

Thanks!!!
Sam

Chris Scott

unread,
Jul 17, 2008, 9:55:28 AM7/17/08
to twitter-deve...@googlegroups.com

On Jul 17, 2008, at 7:44 AM, Sam Wilson wrote:

>
> Ed, good point :) My goal is to program is a non-fancy twitter
> badge for my blog that has my latest twit. Questions:
>
> 1. Where to get the as3 Twitter API files? (not in downloads)

Have you seen/tried this?:
http://code.google.com/p/twitterscript/
(reference: http://fupeg.blogspot.com/2008/04/twitter-api-in-actionscript.html)

> 2. How does app authenticate itself? (putting user/pass in as3 code
> seems very unwise!)

Do you need to authenticate? Can't you use the unauthenticated show
method?

Personally, I'd use a PHP (or whatever lang. your blog uses) page to
call the show method, cache that, and then have it spit the latest
tweet out when called from your Flash file. However, it has been a
while since I've done anything Flash so there may be a better way to
do it.

--
cs
http://iamzed.com/
http://hailtheale.com/

Sam Wilson

unread,
Jul 17, 2008, 10:48:12 AM7/17/08
to Twitter Development Talk
Hi Chris,

Thanks! No I hadn't seen that yet, very useful! So it looks like
Twitter itself ditched the official as3 support.

And yes you are right, what am I thinking, I don't need to
authenticate unless I planned to make updates from the badge (which
I'm not). Brain fart.

Thanks again! If I get this damn thing working then I'll post a
reference and the source.

Sam

Ed Finkler

unread,
Jul 17, 2008, 11:04:48 AM7/17/08
to twitter-deve...@googlegroups.com
There are also, IIRC, some complexities with AS3 apps doing Basic HTTP
Authentication that require using a proxy of some sort.

Sharing code would be awesome. Thanks in advance.

--
Ed Finkler
http://funkatron.com
AIM: funka7ron
ICQ: 3922133
Skype: funka7ron

Sam Wilson

unread,
Jul 17, 2008, 11:27:17 AM7/17/08
to Twitter Development Talk
Ah good to know. First results look promising (can get public timeline
in Flash), however I'm sure there will be some bumps... it's Flash
after all. But thanks for the help. When I have my basic badge working
I'll post it on my site with a brief write up and the code.

Best,
Sam

Sam Wilson

unread,
Jul 17, 2008, 1:00:39 PM7/17/08
to Twitter Development Talk
Ed, thanks I'll search around for a proxy of some sort. I posted a
badge but of course the Flash won't show up when posted to a page
because Twitter I guess doesn't have a cross domain policy for it now.
But I posted my source here http://www.storypixel.com/index.php/newstory/blog/twitter_in_flash_a_starter_kit/

If anyone can let me know a specific simple proxy to use, that'd be
the missing link.

Thanks,
Sam

Sam Wilson

unread,
Jul 17, 2008, 2:01:57 PM7/17/08
to Twitter Development Talk
Also it is working but I've exceeded the "Rate Limit" of 100 requests
an hour. I don't have anything to handle that error in the as3 so
until I address it, there won't be any Tweet show up when I've
exceeded that puny 100 request limit (for example, right now).

Thx again,
Sam

Sam Wilson

unread,
Jul 17, 2008, 1:47:56 PM7/17/08
to Twitter Development Talk
BOO-YAH it works... thx for the tips. Required php proxy. My server
doesn't support curl but i had access to another server that did, so I
needed a proxy + a crossdomain.xml file (on the other server that i
have access to which has curl) I'm going to do a small write up about
this and share my updated source shortly. I'll credit you guys for the
help. Thanks! Look for updated source about 10 minutes after this
post: http://www.storypixel.com/index.php/newstory/blog/twitter_in_flash_a_starter_kit/

Sam

Rob Iles

unread,
Jul 17, 2008, 5:37:46 PM7/17/08
to twitter-deve...@googlegroups.com
Nice Write-up Sam - it's good to see someone "giving back" to the community :)

R.


2008/7/17 Sam Wilson <story...@gmail.com>:



--


Rob Iles

RMIDevelopment

Web: http://www.rob-iles.co.uk/rmidevelopment
Twitter: http://twitter.com/Rob_Iles
Mobile: 079 6666 1092
Skype: rob_iles

Reply all
Reply to author
Forward
0 new messages