Issuu on Google+

// app include facebook <?php require_once 'facebook.php'; $appapikey = '[API Key]'; $appsecret = '[Secret Key]'; $facebook = new Facebook($appapikey, $appsecret); $user = $facebook->require_login(); $appcallbackurl = '[Callback URL]'; //catch the exception that gets thrown if the cookie has an invalid session_key in it try { if (!$facebook->api_client>users_isAppAdded()) { $facebook->redirect($facebook>get_add_url()); } } catch (Exception $ex) { //this will clear cookies for your application and redirect them to a login prompt $facebook->set_user(null, null); $facebook->redirect($appcallbackurl); 1 <?php require_once 'appinclude.php';?> 2 <h1> 3 Bienvenidos a ConexionRadio.NeT</p> 4 Hola <fb:name uid="<?=$user;?>" useyou="false"/></p> 5 Tus amigos son:</p> 6 <table> 7 <?php 8 $i = 1; 9 foreach ($facebook->api_client-


>friends_get() as $friend_id) { 10 if ($i == 1){ 11 echo "<tr>"; 12 } 13 echo "<td>" . "<fb:profile-pic uid='" . $friend_id . "'/>" . "</td>"; 14 echo "<td>" . "<fb:name uid='" . $friend_id . "'/></br>" . "</td>"; 15 if ($i == 4) { 16 $i = 0; 17 echo "</tr>"; 18 } 19 $i++; 20 } 21 ?> 22 </table> 23 </h1>


app