Facebook Connect with AIR on Android


Last week we published a new Facebook SDK for creating Flash and AIR applications that incorporate Facebook connectivity using their new Open Graph API.  The design of their API is really great and uses Open Authentication version 2.0, so it’s easier than ever to connect your applications – and help them go viral.

Creating an application couldn’t be simpler, just go to this link and fill in the details to retrieve your Application ID.  You’ll only need that to connect your new application.

Admittedly I was a little surprised to see that AIR on Android wasn’t supported, although the full source is published and so it was easy to start adapting it for use on Android.  In the video above you can see how simple it is to connect your applications.

Below you can download the full source and step through the application.  Maybe you can add a feature that supports status updates?

FaceCard Download

FacebookMobile Download

Radar

In addition, I have been adding support for Facebook and Twitter connectivity to my Radar application – currently available on the Android Market.  This application has become much more complex as a result, but I think it’s now looking really great.

You can download the application on the Android Market, or for the Desktop here.  If you are feeling brave then you can find the source for this application below.

Radar Source Download

, , ,

  • http://flashinit.com/blog Pedro Canterini

    Big thanks to everyone involved in the Air for Android project. It is amazing how easily I can build phone apps with as3 (although I still cant believe there is no android TTS suport yet).

    Just a tip that I don’t know will work on your phone (it does on my evo 4g) Hold the home key for a bit and it should show you the running apps or last used ones.

    Thanks for sharing you experience!

  • torpedete

    This runs on all the Android devices :)

  • http://www.flex-tutorial.fr Adobe Flex Tutorial

    Hi,
    great application really.
    Just have a quick dev question, how did you manage to get GMaps on Android cause there is a known bug (in the gmaps sdk bugbase) that makes ur application freeze for seconds (depending on the size of your application). You can “hack” it opening the map in another Window but that can’t be done in AIR for Android because it’s not a Windowed application.
    Do your mobile app suffer from this bug too?

    Thanks a lot !
    Fabien

  • ilich

    Very interesting video, thanks mark!

  • http://www.flashmobileblog.com Mark Doherty

    Hi Fabien, The application does have a moment where it is using a ByteArray to somehow authenticate the application during the init phase. In my application I am lazy loading the map in the background, this happens when the user is looking at the login screen. To prevent any issues I am loading the map, then starting the Twitter/Facebook login sequence and only then presenting the login button.

    So the map is initialized in the first frame, it’s on the stage in the FLA doc. When I get to the second frame it is already running and ready to go. The full source is available on my blog so I suggest stepping through that with the debugger to see the actual flow.

    Mark

  • Ramonflex

    Hi Mark, When we integrate the twitter API in our AIR Mobile app the same way you described here , after twitter webview is loaded, the callbackURL comes on screen and app sticks there and never comes back. Does it have to do anything with access key/consumer details etc?  I guess its more to do with the way we register our app rather than the code coz I didn’t make any changes in the code except the twitter keys you get while you register your app.

    Any help is highly appreciated.

    Cheers

  • Andriuskirilovas

    Hey Mark, maby you know the way to post message on users wall using your as3 app for android? If you do or if you know were to find it I would be very grateful if you could share that with me.