Digital Web Magazine

The web professional's online magazine of choice.

How To Build A Facebook Application : Comments

By Gareth Rushgrove

January 22, 2008

Comments

Brad Dougherty

January 22, 2008 10:37 PM

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().

Chris Vincent

January 22, 2008 10:57 PM

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/

Bryce

January 23, 2008 12:20 AM

Just a note – your link to CSS Tips and Tricks is broken.

Great article :)

Matthew Pennell

January 23, 2008 1:44 AM

Thanks, Bryce – fixed now.

Gareth

January 23, 2008 2:06 AM

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.

Seth Taylor

January 23, 2008 7:59 AM

Great article and great Facebook app primer. Easy to understand and follow.

p

January 23, 2008 10:47 AM

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!

Gareth

January 23, 2008 12:33 PM

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.

Chris Nolan.ca

January 24, 2008 9:50 PM

Great article for a beginner.
Just a few notes about some out of date info:

Geoserv

February 26, 2008 3:05 AM

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/

EasyThereTiger

February 29, 2008 11:45 AM

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!

Gene Ellis

February 29, 2008 8:58 PM

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

monkey

April 8, 2008 12:12 AM

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?

megan

May 6, 2008 11:49 AM

Well done. Would love to see part 2 to this article!

Arun

July 15, 2008 2:58 AM

Hi,

Thanks for the nice writeup. Could you explain how you setup the google urchin tracker? Google keeps reporting “Tracking Not Installed” in the status. What is the page argument – can I generate one per page, or should I first register the page in Google?

Thanks.

Boszkowo

July 24, 2008 8:32 AM

Great job, interesting interview.
Thank you from Poland

icegirl

July 28, 2008 10:45 PM

I was able to create my first app:
http://apps.new.facebook.com/job_search/searchtest.htm

How do I add an option to make this appear in the main page/profile? Currently, user has to go to Applications tab to use Job Search.

Spyko

August 8, 2008 1:18 AM

This is very helpful. Thank you!

Sampath Kumara

September 17, 2008 12:36 AM

Hi,
When I’m using ASP.NET as the developing technolog,
I faced the problem;
FBML Error (line ): illegal tag “body” under “fb:canvas”

I solute the problem by, setting AutoEventWireup=“false”

This fixed my problem.
:)

Facebook Application

September 29, 2008 11:51 PM

Nice and informative.create facebook application and boost your business.

Rohit Sharma

October 11, 2008 1:16 PM

Hi Gareth, Thanks for the nice article.It really got me started. But I am now facing the same problem as faced by P even if I am using the files downloaded from this tutorial. When I am accessing the app after logging in, I am able to see the app. But when I am accessing it from outside, it is not visible. Is it because my application is still in a development stage and I
have not submitted it yet. I have tried changing the appcallbackurl but nothing is coming out of it. Can someone help me?
Eagerly awaiting responses,

With Regards,
Rohit Sharma,
www.mactabilisarts.com
www.kwizmania.com

Jagjit Johal

November 15, 2008 9:35 AM

This is some really good stuff. Helped me out a lot. Hope to get the facebook Ap up and running soon. Thanks a bunch!

Sorry, comments are closed.

Media Temple

via Ad Packs