First, uou must have at least a www server. 1st - AT FACEBOOK
visit
www.facebook.com Click on the "Developer"'s link at the bottom of the page. Then, click on "Get Started". Then, click on "Add Facebook Developer Application" to add the the application which named "Developer". After you added this application to your profile, try to create a new application by clicking on "Setup New Application" at the top right of the page. It will give you an "api key" and the "password".
2nd - AT YOUR SERVER
Create a new file "whatever.php" under a directory with:
whatever.php -----------------------------------------------------------------------------
<?php
// key
$api_key = 'the api key you got after you created the app';
$password = 'the password you got after you created the app';
?>
end of whatever.php --------------------------------------------------------------------
then create your main index file "index.php" under the same directory with:
index.php ----------------------------------------------------------------------------------
<?
// the facebook client library
include_once 'client/facebook.php';
// some basic library functions
include_once 'lib.php';
// this defines some of your basic setup
include_once 'whatever.php';
$facebook = new Facebook($api_key, $password);
$facebook->require_frame();
$id = $facebook->require_login();
echo "Hello~!!! Your facebook id is ".$id;
?>
end of index.php -------------------------------------------------------------------------
after you created these files, you know that you need the facebook client library files "client/facebook.php" and "lib.php" which are required by index.php. So~ upload those files. (you can find these required files at
http://developers.facebook.com/clien...latform.tar.gz)
3rd - AT FACEBOOK
go to "Developer" app. Then, you will see your application's info. at the top right.
Click on your application, then click "Edit Setting" then set the callback url to your www directory where you saved the files ("index.php", "whatever.php" and the library files).
For example:
http://www.example.com/MyGame/FBversion/
After all this, you can start to test your application out by visiting:
http://www.example.com/MyGame/FBversion/