The code is very simple.. Just the Google Add scriptlet and then the Sample PHP code from facebook developer. In a whole it looks like below.
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
// Copyright 2007 Facebook Corp. All Rights Reserved.
//
// Application: nothing
// File: 'index.php'
// This is a sample skeleton for your application.
//
echo "This is my FB app";
require_once '/home/da2642e0/facebook/facebook-platform/client/facebook.php';
$appapikey = 'Your App ID';
$appsecret = 'The secret Key';
/*$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->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 "
";
?>
No comments:
Post a Comment