Let your Api users to display the pics of their friends .
FriendsPics.Php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |