Facebook api php get specific friend profile -


i want know date of birth of specific friend. i'm using this. possible friend profile field?

$user = $facebook->getuser(); $perms = array('scope' => 'email,user_photos,read_mailbox');  if ($user) {   try {     $user_profile = $facebook->api('/me'); $facebook_login = "1";   } catch (facebookapiexception $e) {     $user = null;   }  } else {    die('<script>top.location.href="'.$facebook->getloginurl($perms).'";</script>');  }    if ($user) {     $friends = $facebook->api('/me/friends');     foreach ($friends["data"] $value) { ?>        <img src="https://graph.facebook.com/<?php echo $value["id"]; ?>/picture"/> <?php echo $value["name"]; ?>       <?php } 

i can complet name , id of friend, want date of birth. , of specific friend, ex. $friend = $facebook->api('/me/friends/friend_id');

thanks

you'll need request friends_birthday permission in $perms array access field looking for.

also, if want able access user's birthday you'll want user_birthday permission.

you can read more these permissions here:

https://developers.facebook.com/docs/reference/login/extended-profile-properties/


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -