O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hello World

Problem

OK! I have my new Hello World application set up in the Developers app. Now what?

Solution

You have your app all ready to go, but when you go to your URL (one like http://apps.facebook.com/jays-fantastic-demo), you get a 404 error message (see Setting Up a New App for more about setting up your app). The problem is that you don’t have anything on your server for Facebook to display, so let’s put something there. Make a new blank page in your favorite text editor (see Facebook Developer Software Toolbox for a list) and stick this in it:

<p>Hello <fb:name uid="loggedinuser" firstnameonly="false" useyou="false"/>!</p>

Save the file to your http://yourdomain.com server as index.php, and then reload your new Facebook app.

Discussion

You should now have a fully functional Facebook application that only you can see. Congrats! This app can be used as a great test bed for all of your ideas as you work your way through the rest of this book.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required