On March 31 Facebook developers announced that Adobe and Facebook are working together to provide official support for building rich social applications in Flash.
You can read the full Josh Elman’s announcement at this link.
The new ActionScript 3.0 Client Library for Facebook Platform API, fully supported by Facebook and Adobe, makes it easy to build applications that combine the strengths of the Flash Platform and Facebook Platform.
Flash is available on more than 98% of Internet-connected PCs, so people can immediately access the applications, content, and video that enable social interactions. The Facebook Platform is used by millions of people everyday to connect and share with the people in their lives.
You can read more about it at this page.
Obviously I started playing with this new API, and I followed the instructions in the official tutorial Create your first Facebook application with Flex, changing a couple of things to make it work as I wanted.
This is the source code:
And this is the result:
As I am not a Flex maniac, I will fully explain (and improve) the script as soon as I’ll convert it to an AS3 class. Meanwhile I want you to focus on line 40 where I am getting information about the user.
The official page where you can get all the information about this process is this one.
Meanwhile, you can download the full source code with all needed libraries.