How To Build A Facebook Application : Comments
January 22, 2008
Comments
There’s a slight problem with your app. If you go to the application page you will be asked to log in to the app. Directly after that, you will be asked to add the app.
The easiest thing to do would be to change require_login() on line 7 to require_add().
I’d like to attest to the ease of developing Facebook apps in Ruby on Rails. PHP is easy to get started with since all Facebook’s examples are written in it, but once you get past actually getting the app to run on the platform (not too difficult to get started with RFacebook or the newer Facebooker gem), the rest is really a breeze, just like any Rails app. The only other issue I ran into was difficulty sticking strictly with REST, since every Facebook server request is a POST request, but they now have a parameter which the app can use to distinguish what type of request the user was really doing when the request was triggered, so this isn’t a problem anymore.
Anyways, if anyone has time to check out my latest app, Reviews, I’d love to hear some feedback. The app URL is at http://apps.facebook.com/-reviews/
Just a note – your link to CSS Tips and Tricks is broken.
Great article :)
Thanks, Bryce – fixed now.
Thanks Brad. I’ll try that out.
Chris. I think Facebook did a good job of making their platform pretty much agnostic. You can build apps in whatever language you prefer without needing to jump through too many hoops. Rails, Django, even Java or .NET will see you right if that’s your thing.
Great article and great Facebook app primer. Easy to understand and follow.
Very well written and easy to follow. In fact I was inspired to create my first simple facebook app! http://www.facebook.com/apps/application.php?id=23795560017
I have a question though… Why do I always get a “page you requested was not found” error when I try to navigate to my http://apps.facebook.com/whatsikatboso/ without logging in? I don’t get this error message while I am logged in. What did you do differently? Do I have to ‘submit’ the application to the Facebook directory before the apps.facebook.com/whatsikatboso URL will be ‘visible’ to those who aren’t logged in?
Hope you’ll be able to clarify the matter and maybe update your original article so people won’t make the same mistake I did. Thanks!
Hi P. Glad you enjoyed the article.
I think your problem could be the @appcallbackurl variable set in the config.php file. You need to set this to the url of your application on your server. The catch statement in config.php redirects you to that url if you’re not logged in – which might explain your problem. Let us all know if that works out.
Great article for a beginner.
Just a few notes about some out of date info:
- link files for css are handled now
- publishActionOfUser is being depreciated. You’ll want to use feed.publishTemplatizedAction instead
I have been trying to do an app for one of my websites, will try to get this to work.
Thanks.
STUMBLED!
Added to TopStumbles:
http://www.topstumbles.com/how-to/digital-web-magazine-how-to-build-a-facebook-application/
Thanks for this great introduction to FB Apps!
I downloaded your source files and placed them on my hosting provider. I also followed your setup instructions, but when going to the URL, I receive the following error message.
FBML Error (line 18): illegal tag “body” under “fb:canvas”
The body tag is not found within config.php or index.php … any ideas on this error?
Thanks!
Thanks a ton for this article! At the bottom, you mentioned there being a follow up (or 2nd part) to this article. Has it been published yet? Thanks!
Gene
Using your source code on the facebook acelerator joyent server, and replacing the corresponding keys and callback, this did not work for me.
Also, when I try to do the simple hello world examples, nothing shows up but a blank canvas page.
I simply cannot figure what I need to do to get the simplest app working. Is it a server problem? what more do I need to do to setup the server?
Well done. Would love to see part 2 to this article!



You can use this
feed to keep up with the comments made on this article.