First Experience and Workarounds replied by psneville @ Mon, 21 Jan 2008 22:24:22 -0000

From Recent Posts | Pages, 10 months ago, 1 view

Hi folks,

I spend the past few days learning a bunch of new technologies, and picked rfracebook and rails among them; I just released the test app (http://apps.facebook.com/cozyforcarbon/score) and thought I’d share my experiences.

I posted extensive notes on the facebook forum, but by and large the only major problem I ran into was the use of sessions. I had a good solid day of debugging why users were getting each other’s sessions and why sessions weren’t cleared. Part of this was the fact that I was mixing (1) standard FBML requests (proxied through Facebook) with (2) Ajax.useLocalProxy calls with (3) URLRequest invocations issued by ActionScript in Flash. Well, none of those three approaches shared the same session, as you might predict; worse, it became possible for me to get access to the wrong session instead of no session at all.

I ended up moving to a nearly stateless approach in which I pass the uid around on every invocation and then add a bunch of checksums to verify the identity of the user who sent the uid in the query.

Full explanation of my experiences are on the Facebook forums:

http://forum.developers.facebook.com/viewtopic….

Altogether, it was an interesting experience; I was new to ruby, rails, and facebook, but the fact that I could pull together a small app like this to learn things in only a week or so of after hours part-time effort is really a testament to you and the rails and facebook communities at large. Good on ya! And thanks for being kind to a newb like myself.

Cheers,
Sean

comments

No comments yet.

You must be logged in to add your own comment.