Pages

Saturday, January 31, 2009

I was trying to host a very simple sample from Facebook on the Joyent platform. But I was getting the common error for FB apps. first have a look @ the sample code



require_login();

// Greet the currently logged-in user!
echo "

Hello, !
";

// Print out at most 25 of the logged-in user's friends,
// using the friends.get API method
echo "
Friends:";
$friends = $facebook->api_client->friends_get();
$friends = array_slice($friends, 0, 25);
foreach ($friends as $friend) {
echo "
$friend";
}
echo "
";
?>


here the facebook.php has been added with a relative path.
But in Joyent Facebook platform reside on
this location

'/home//facebook/facebook-platform/client



So I just changed the line

require_once 'facebook.php';

to this one

require_once '/home/da2642e0/facebook/facebook-platform/client/facebook.php';



now the app is running fine.
Enjoy FB developing...

No comments:

Post a Comment