Facebook ActionScript API HOWTO

Sorry for any inconvenience, but I’ve moved!

Check out my website pbking.com to read and respond to my thoughts.

See the Facebook ActionScript API HOWTO on my new site.

15 comments so far

  1. Chris Hansen on

    Hey Jason,

    Thanks for making this API. – Very cool. – I have a quick question for you. – When I try compiling your example locally (with all my keys switched out for me, etc.) – I get two errors: (1) Type was not found or was not a compile-time constant: FacebookDelegate. – line 121 and (2) Type was not found or was not a compile-time constant: FacebookUser. – line 160 – Is this because it can’t be debugged locally? – I tried changing your facebook.startWidgetSession(api_key, secret); to startDesktopSession to see if that would fix it – but it doesn’t. – Am I missing something obvious?

    Thanks in advance!

    - Chris

  2. pbking on

    The FacebookDelegate and FacebookUser classes should be included both in the compiled .swc and in the source. First ensure that you have the .swc correctly installed (or the source correctly mapped). When in doubt use the source files.

    If you’re still having problems getting your project to work then zip it up and email it to me and I’ll be happy to see if I can tell what’s wrong.

  3. Chris Hansen on

    pgking,

    Thanks for the quick reply. – You were right. I hadn’t pathed to the .swc correctly. – I had just placed it in the correct location but didn’t add it through the “library” tab in the properties menu. – It compiles perfectly now… – Now I just need to craft a believable PHP file. :-)

    - C

  4. Rohan Rehman on

    Hi Jason, ur tutorial has left many holes.

    I have added the developer app in Facebook I have a secret and a key but cannot submit ( need more than 5 users).

    Now mwhen I run the app in flex and click on add app lication button ……. it asks for the addAppURL,

    could u elaborate more on that and how to test the app locally on flex?

  5. Rohan Rehman on

    One more thing you mention that the api is not flex Dependant but in flash in your

    HashableArrayCollection class it extends the ArrayCollcetion class which is flex specific, how can I bypass this to test your api in flash CS3

  6. bigrig on

    Jason,

    I tried using your example to start off my own facebook app, thanks for putting it together. I do have a question though. When I put in my own api_key, secret and addAppURL (http://www.facebook.com/add.php?api_key=****), I get a endless loop of “you must first add this app before you use it”. Could you tell me what your application settings are in facebook? I think that’s where I’m getting confused.

    My current setting for callback URL is: http://localhost/Facebook_API_Example/bin/Facebook_API_Example.html
    Post Add URL: http://apps.facebook.com/appName

    Thanks,
    - N

  7. pbking on

    It’s been brought to my attention that since I’m using the ArrayCollection class the API isn’t currently usable in Flash CS3. I started using that class after I had made my initial CS3 tests. I’ll be fixing this (and many other things) shortly in a new release.

    For a more detailed example (and one to see how to test your application locally in “desktop” mode) see the example file in the API source.

  8. Ed J. on

    Hi Jason,

    Thanks for the api and tutorial. Could you add a zipped up copy of the complete tutorial file?

    Thanks,

    Ed

  9. Ed J. on

    Sorry, didn’t see the link you already made!

  10. Joshua Mostafa on

    Just passing through, and wishing to point out that the rpc package (missing from CS3) may give some trouble … you might find this useful:

    http://cs3as3rpc.riaforge.org/

    It’s a replacement for the rpc classes Adobe helpfully removed from the CS3 release of Flash.

  11. Ryan on

    Hi Jason,

    Thanks for the API, but I would like to use this in CS3. When will the API be usable again for CS3?

    Thanks!

  12. pbking on

    I’m working on the CS3 modifications right now. I’ve got just about everything worked out except for the reading of FlashVars. Flex and Flash handle it differently so I’m trying to work out a way that can be common for both. Once that is done the CS3 compatable version will be out. Hopefully in the next couple of days.

  13. Ryan on

    Thanks for that! I appreciate it and looking forward to working with it.

  14. pbking on

    I just thought I would drop a line here for anyone who is watching that the API has been recently updated to version 0.7.7. The source (via .zip as well as SVN) is available as is a precompiled .swc file.

    I’ve got an instance of the library compiling in Flash CS3 though I’m not actually doing anything with it yet. A more detailed example should be coming soon, but if any of you come up with one PLEASE let me know; I would LOVE the help! Thanks for your patience all you Flash Hackers!

    By the way, the example in this blog entry is STILL using the 0.7 version of the API which DOES have some differences. Please see the example that’s actually IN the API for the most up-to-date usage.

  15. Ryan on

    Thanks Jason! I’ll try to come up with an example..


Leave a reply