With the Facebook introduction of Graph API, there are several ways of authenticating (logging in user) and displaying the permission request. Before we continue, let’s see an example of two of them: Popup Authentication This method spawns a new bowser window (as popup) containing the form: Same Window Authentication This methods opens a Facebook page […]

Note: I tested the issue and the solution using Windows Opera 11.01 build 1190 and confirmed the fix works. The Problem Calls to FB.api never executed their callbacks. For instance, in this code, Firefox and Chrome prints: window.fbAsyncInit (from line 4) and onGetLoginStatusResponse (from line 33), but Opera 11.01 only prints the window.fbAsyncInit. Fixing It […]

This post will show you how to retrieve a list of the user Likes (i.e.: list of Applications, Pages that the user has clicked the Like button). You need to be familiar with setting up a Facebook Application and using the JavaScript Graph API to follow this tutorial. For an overview of the Graph API, […]

Here’s the example files for https://www.permadi.com/blog/2011/02/using-facebook-graph-api-in-flash-as3-to-post-to-photo-album/: /tutorial/as3-save-photo-to-facebook-album/as3-save-photo-to-facebook-album.zip Remember to change the APP_ID with your own APP_ID in order to make it work on your server domain (i.e.: the APP_ID in the FLA and client_id in the index.php).  You can rename the index.php to index.html if you are not using php. The example is written in Flash […]

Please upgrade your browser Download It (requires Flash CS4 or newer) The code is in the actions layer on the FLAs main timeline. To use the example on your site, you need to change the APP_ID. The download already includes the facebook-actionscript-api files, located within GraphAPI Source_1_5 folder (you can get the latest facebook-actionscript-api from […]

The guide below is an extension of this tutorial: https://www.permadi.com/blog/2010/12/using-facebook-open-graph-api-in-flash-as3/. The function to get your profile picture is Where uid is the Facebook user id. Once you establish a Facebook connection, your user id is available at Facebook.getSession().uid. So we can call: This will give you the URL which ‘theoretically’ you can ask a Loader […]

Updates Facebook requires the use of OAUTH2.0 nowadays. Some of the changes required are: session is now called authResponse. getSession is replaced with getAuthResponse. perms is now called scope. The zip file (as3-open-graph-example-basic.zip) linked below includes these changes (there are changes in .as, .html files and in the first frame of the example .FLA). Please […]

This guide assumes familiarity with setting up application susing Facebook Open Graph API in JavaScript, which is explained here: /blog/2010/11/facebook-open-graph-api-authenticating-in-iframe-applications/ Simple List To get the list of friends using Open Graph API, you can call: after the user is authenticated. Example: Note: FB.api(‘/me/friends’, onFriendsListLoaded) sends the request to Facebook and onFriendsListLoaded is the callback function. […]

The latest Facebook API, dubbed Open Graph API , is a powerful replacement to the old API. However, the documentation (in particular regarding authentication) is not very clear. Hopefully this will help you get up to speed with what it takes to authenticate users. This tutorial assumes that you have already setup your application on […]