Updating my Starter Kit to Facebook Developer ToolKit v3.0 Take 1

Over the break I took a look at updating my Facebook Developer Toolkit (FDT) Starter kit to the latest v3.0 release that was announced at PDC. My first thought was to download the sources via SVN but unfortunately, that failed so I resorted to using the SDK Source download which I’d rather not do as it leaves no easy way to keep up-to-date with recent checkins.

Anyway, I built the sources which “just worked”, surely a good sign.

Next, I worked to compile and run my Starter Kit application and here is what I found (at least so far):

  • Delete old referenced assemblies
  • Change using statements:
    • using facebook; –> using Facebook
    • using facebook.web; –> using Facebook.Web;
    • using facebook.Schema; –> using Facebook.Schema;
  • Master.API.uid; –> Master.Api.Users.GetLoggedInUser();
  • Master.API.friends.getUserObjects(); –> Master.Api.Friends.GetUserObjects();
  • Master.API.photos.getAlbums(); -> Master.Api.Photos.GetAlbums();
  • facebook.Schema.user –> Facebook.Schema.user
  • Master.API.users.getInfo(Master.API.uid); –> Master.Api.Users.GetInfo(Master.Api.Users.GetLoggedInUser());
  • facebook.fql q = new facebook.fql(Master.API);
    • Add using Facebook.Rest
    • facebook.fql q = new facebook.fql(Master.API); –> Fql q = new Fql(Facebook.Session.FacebookSession);
  • Convert Site.Master page Page_Load method to a constructor setting RequireLogin = true;
  • Regular Expression bug

Until I get some time to resolve the RegEx issue the rest will be on hold for a bit though things are looking pretty good and the above didn’t take long at all. I have noticed a few worrisome comments on the discussion forum.

7 thoughts on “Updating my Starter Kit to Facebook Developer ToolKit v3.0 Take 1

  1. To resolve the IFrame issues that I spoke about on the FDT discussions board, simply download the latest build from the CVS on Codeplex, there are some significant changes that fix the losing session issue.

  2. Hi Steve,
    – There are quite a number of issues. The library will throw several exceptions because the code is not robust. Obviously, there should be more checking of the data and you could not just rely on the predefine data.
    – For example, when converting XML data to enum, it is always a good practice to check that the data from XML is actually defined in the enum list. If it is not, then do something or assign to unknown maybe.
    – Another example, religious and political view does not have a predefined list. There are entered in a text box. So, the users can key in anything they like. Then, translating these data to an enum value simply does not make sense to me. They should be treated as it is.
    – Relationship status might have the same problem.
    – There should be more optimisation of FQL required in order to avoid several round trip to the server.
    So, for my own project, I just installed all the source code as part of the solutions and do the debugging & fixing things progessively. Its only less than a week so there could be more issues / bugs in there. The main part of my project uses IFRAME but I need 1 or 2 page in FBML, like TAB and Publisher.
    BTW, thanks to Microsoft and partners for making these library available. My thanks goes to you too Steve.
    It make the jobs much easier. I am not complaining but just want to share what I have found so far.

  3. Hi mattsofi,
    Agreed, I’ve noticed similar things myself. I’d suggest tracking these issues in Codeplex so we can make sure the guys from Clarity see them. Thanks for the comment!

  4. Hey Steve,
    Do you have any updates on this. Nevertheless, although I couldn’t get to compile your toolkit with the latest SDK build, I was able to trouble shoot and get my original code working by going through your steps and old code. Thanks.

  5. FB_newbie,
    I haven’t had a chance to revisit this and given my current schedule and the fact that his is just a personal interest it may not happen soon. I’ll certainly post any updates when they happen. Glad to hear you got your code working.

  6. Hi,
    Thanks for doing this great job. It is a great help for beginners like me. In Facebook Developer Toolkit (FDT) version 3.01, the function you mentioned above, ie. Master.Api.Friends.GetUserObjects(); requires the user id. Otherwise, we have to set a session. I am getting a little confused on this. Could you please make an updated starter kit based on Facebook Developer Toolkit (FDT) version 3.01, and in that add an example for extending permission, like offline_access, read_stream et?
    Thanks again

Comments are closed.