Fools Garden
mY dEaR diARy!!!

Facebook Hello World Application

August 19th 2009 in Facebook

Okay to create a new aplication on facebook, we will begin with developing the most basic application that ever be..!! This is just to realize some basic concepts on viewing facebook application on canvas page and other minor details.

Project : Hello world

Required : Web space(where you can host your application), BAsic knowledge of PHP and java.

Setps :

  • Create  a new page on your website as hello-world.php and place it in your application directory of your site.(Create a application directory as “facebook” in the root of your site.)
  • Download Client Library (This package has all the files that make up the official PHP Client Library, as well as a sample application)
  • Unrar this folder in the root directory for your applications in your site.
  • Now copy the code below and save it in your hello-world.php file.

require_once ‘facebook.php’;

$appapikey = ‘YOUR APPLICATION KEY’;


$facebook = new Facebook($appapikey, $appsecret);

$user_id = $facebook->require_login();

// Greet the currently logged-in user!

echo “<p>Hello, <fb:name uid=\”$user_id\” useyou=\”false\” />!</p>”;

// This just uses a fb:name to recive your name and then display it. This is an example of signed canvas. You might hav to login to view your application page.

  • Now configure Your application on facebook.
  • Register a new application on facebook.
  • In settings tab, Set Canvas page URL as “hello-world”(This does not support more than 20 characters and capital letters)
  • And Callback URL as the absolute URL of the page we just saved.(hello-world.php)
  • are done..with your first application on facebook.
  • Now go to the canvas page url to check if everthings wqorking fine. If not don’t worry..just ask me..!!! It would work newayz..!!

This might not enerzige you a lot as this does not do many a things besides printing your name on the application page ( or the one who is viewing this page.) . But this builds your basic to get things going.

Now you can build any page in simple php and try to render it on canvas page. Keep trying..!!


Popularity: 21% [?]

You might also like Like :

3 comments to...
“Facebook Hello World Application”

Just wanted to ask about the callback URL of my page of facebook application.
Please elaborate this line “Callback URL as the absolute URL of the page we just saved. ” like where we need to save the page and how to make it accessible to the application on facebook.


Sorry for a bit late reply. You need to save the page on your server, like
And entering that url on the Facebook app admin page will make it accessible. Follow my guide thoroughly to do it. :)
hope that clears up a bit. If not please feel free to ask.


required - won't be displayed

Your Comment:

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!:

Why ask?

The callback page is the page Facebook calls whenever it needs to notify your app of something or get the content of the canvas page for your app.
Canvas Pages & Callback Pages
Note that the user can be either logged into facebook or not, and even if a user is logged in, he/she might have authorized the [...]

Previous Entry

CyberLink PowerDirector is a video editing and video converting software application for non-linear video editing with is the competitor to Adobe Premiere Pro and Elements, Corel VideoStudio, Pinnacle Studio, Final Cut Express and Sony Vegas Movie Studio. CyberLink PowerDirectory allows users to capture, edit, produce, output video and create disc from within the software and has [...]

Next Entry

August 2009
« Jul   Sep »