Reading and settings scores to facebook app / game and my Adobe’s FB API update

March 22nd, 2012 by Slav

Majority of the calls you would ever make to Facebook API require user access token. There are some however, that require app access token instead. These are normally calls you do on behalf of the app not user. An example of such situation would be creating a test users, or reading Insight data.

To my surprise app access token is also required when you want to read or set user scores.

For those who are not aware of this, you can set and read score value for an app user.  For this to work, you have to set the type of your application to “Game”, in the FB developers app general settings page.

As current Adobe’s Facebook API didn’t support making such calls, I modified the source code (for web development) so that it would.

Btw, if anybody from the Adobe’s Facebook API administrators is reading this, please feel free to include these changes in your next version. You can download the modified source  here.

So how do you use this ? Here is the example how to set and read user scores, and also how to read scores of the users’s friends that have played the app/game. Read the rest of this entry »

Posted in AS3, Facebook, flash, Games | 24 Comments »

Publishing Open Graph actions to Facebook ticker with Flash

March 15th, 2012 by Slav

It has been a while since Facebook announced changes to their API , including the introduction of new customisable open graph actions. Probably most famous example being The Guardian app publishing : “Mike Nolan is reading : “How to grow a dandelion” article on Guardian. Or some other user “Is listening to Depeche Mode” on Spotify. While you can get plenty of tutorials on how to achieve this in HTML / PHP I haven’t been able to found any on how to do this in Flash. It might be that my googling skills are diminishing, or the fact that you actually can’t do this PURELY in flash. Why ? In a similar way the “share” functionality works , for this to work properly, Facebook must read html metadata from your page, and use them to construct the ticker update. You can however trigger publishing the action from flash and with a bit of php magic link deeplink from the published action  on ticker back to your app. Here’s how: Read the rest of this entry »

Posted in AS3, Facebook, flash, html5, php | 6 Comments »