Stay Signed In
Do you want to access your site more quickly on this computer? Check this box, and your username and password will be remembered for two weeks. Click logout to turn this off.
Stay Safe
Do not check this box if you are using a public computer. You don't want anyone seeing your personal info or messing with your site.
$ wget 'http://developers.facebook.com/clientlibs/facebook-platform.tar.gz'
$ tar xvf facebook-platform.tar.gz
$ cp facebook-platform/client/facebook*.php MY_DIR
<?php// Copyright 2007 Facebook Corp. All Rights Reserved. // // Application: ({})// File: 'index.php' // This is a sample skeleton for your application. // require_once 'facebook.php';$appapikey = 'fb412dfa9b68f0a13ef0cd2764b2bd45';$appsecret = 'b904022cf2faf7c3c382114d9bb5bfa1';$facebook = new Facebook($appapikey, $appsecret);$user_id = $facebook->require_login();// Greet the currently logged-in user!echo "
Hello, <fb:name uid=\"$user_id\" useyou=\"false\" />!
";// Print out at most 25 of the logged-in user's friends,// using the friends.get API methodecho "
Friends:";$friends = $facebook->api_client->friends_get();$friends = array_slice($friends, 0, 25);foreach ($friends as $friend) { echo "
$friend";}echo "
";