[ Content | View menu ]

facebook app

Written on January 22, 2008

Yesterdays conference at Xeequa made me curious about writing a facebook app. Apparently there is more than enough information about that and a huge bandwidth of different APIs is being offered. Since I am right now learning Ruby on Rails I wanted to combine these two and decided to use the rfacebook library for RoR. I also found a little guide which should help me setting up a simple test application quickly.

Installing the needed gem was a piece of cake but the also supposedly simple installation of the rfacebook plugin turned out to be a problem on my desktop PC. It magically worked on my Laptop. But I wanted it to run everywhere. As I found out this afternoon the problem was that no SVN client was installed on my PC. Took me a while to figure out that this one is being called in the background.

This being done I quickly had the controller created and copied the needed code. Then application really was able to open facebooks application logon screen which already was a success. Sadly enough this success was followed by a little bummer since apparently showing a image brought up the following error:

super: no superclass method `path_to_image'

Deleting the line in question killed the error but of course now the picture is not being shown. Apparently the function is somehow wrong. I found some information on the internet what to change in the rfacebook files to make it work anyway but it didn’t work for me. If somebody knows this error please let me know!

the error

Still nice without the image

So it looks like writing applications for facebook is not as complicated as I expected it to be. I also like the huge amount of information available about it. But the rfacebook library appeared to me pretty buggy and underlying too much change. Since it’s only version 0.9 I should spare them from complains about that. Overall I feel confident about being able to achieve with this technology what I want to. What this exactly will be should be revealed in the next few days/weeks when the first version of my app will be available.

Filed in: ruby.

One Comment

Write comment - TrackBack - RSS Comments

  1. Comment by daphne:

    I got the same error and was able to resolve it like so:

    - Go into /vendor/plugins/rfacebook/lib/view_extensions.rb
    - Find def image_path
    - Replace the contents of def image_path (the one line that aliases to path_to_image) with the contents of def path_to_image

    Must be the backwards compatibility that is tripping it up, at least for me. Hope it works for you, too!

    April 1, 2008 @ 6:44 am
Write comment