I confess. I havent had time updating this blog.
One of the more interesting projects that we have been working on is developing a facebook application using Rails.
I cant tell you what is this application about yet (the client wont let me)
But it’s a very exciting car/race game application, sort of like Speed Racer, but much better!
In developing this application, there are several issues I want to share with readers…
1) We wanted to use Rails 2.0, but unfortunately rfacebook doesnt seem to be compatible yet.
As I need ActiveResource for the project, I use Rails 1.2.4 instead…
2) We wanted to customize the profile box depending whether the viewer is the profile owner or not, like in this liverail tutorial (which we follow, but pretty outdated). But unfortunately, I can no longer do that…
3) We use lots of javascripts, such as tooltips and redbox plugin, but doing them in FBML is impossible(?), so we decided to use iframe, which works as good.
4) But using iframe can mean an ugly vertical scrollbar. One way to get rid of the scrollbar is to have the app rendered as FBML, and then use fb:iframe (so that javascripts still work) with a longer height.
5) Yes, we can know whom the user just invites on facebook (so that we can reward them with points, for example). On the ‘action’ parameter of fb:request_form, that’s where facebook will POST to after it’s done. It will give us params[:ids] as an array of user_ids just invited by the user.