Monday, October 31, 2011

Facebook application developer Facebook Api PhP - friendspics.php

Let your Api users to display the pics of their friends .

FriendsPics.Php

<?php
require 'config.php';
$friends = $facebook->api('/me/friends');
foreach ($friends as $key=>$value) {
echo '<font color=red><b>' . 'Oh, i have ' . count($value) . ' Friends'. '</font></b>';
echo '<hr />';
echo '<ol id="friends">';
foreach ($value as $fkey=>$fvalue) {
echo '<li><img src="https://graph.facebook.com/' . $fvalue[id] . '/picture"
title="' . $fvalue[name] . '"/></li>';
}
echo '</ol>';
}
$redirectUrlk = "https://www.facebook.com/dialog/oauth?client_id=118487369116&redirect_uri=http://evry1falls.freevar.com
/test12/index.php&state=5da7ce9f0201f209c7d699cb881c3b02&scope=
read_stream,friends_likes"; ?>
</p>
<p align="center"><a href = "<? $redirectUrlk ; ?> . "><strong>Back</strong></a>
view raw gistfile1.phtml hosted with ❤ by GitHub

friendlist Previous | Next try.php