I want to get the birthday date of a specific friend using facebook api php. I have the friend's id passed from a form with a friend list in te variable $_POST[friend_id]. I'm doing something like this but I can't get the friend data:
$user = $facebook->getUser();
$perms = array('scope' => 'email,user_photos,read_mailbox,friends_birthday,user_birthday,user_likes');
if ($user) {
try {
$user_profile = $facebook->api('/me');
//get friend data
$friend_profile = $facebook->api('/me/friends/' . $_POST[friend_id]);
} catch (FacebookApiException $e) {
$user = null;
}
} else {
die('<script>top.location.href="'.$facebook->getLoginUrl($perms).'";</script>');
}
echo $friend_profile['birthday'];
But I can't see the birthday date.
Thanks