$fb_friends = $f1->getFacebookFriends();
$fb_friends_Count = $f1->displayFriendCount(array('users'=>$fb_friends, 'nb_display'=>1));
//get current date
$date_now=getdate();
$current_day=$date_now['mday'];
$current_month=$date_now['mon'];
$current_year=$date_now['year'];
//get friends' details
for($u=0; $u<$fb_friends_Count; $u++) {
$fb_friends_id=$fb_friends[$u]['id'];
$friend_profile1="http://graph.facebook.com/".$fb_friends_id."/";
$friend_profile = @file_get_contents($friend_profile1);
$friend_profile = json_decode($friend_profile,true);
$gender=$friend_profile['gender'];
print_r($friend_profile);
//get birthday
$birthday=$friend_profile['birthday'];
다음은 나의 코드입니다. 나는 이미 user_birthday, friends_birthday 권한을 가지고 있지만 print_r($friend_profile);
에만 다음을 표시합니다. Array ([id] => xxxxxxx [name] => Joye Tanay Lipata [first_name] => Joye [middle_name] => Tanay [last_name] => Lipata [link] => http://www.facebook.com/joye.lipata [username] => joye.lipata [gender] => female [locale] => en_US)
Facebook API 친구가 생일을 사용하여 생일을 반환하지 않음
생일이 표시되지 않습니다.
당신이 질의하고 _all_ 친구들이인가, 아니면 그냥 한 번 특정에 대한 그래프 API 호출에 현재 access_token이 매개 변수를 사용해야합니다? 사용자가 자신의 생일이 친구가 사용하는 앱과 공유되지 않도록 개인 정보 설정을 설정 한 경우 그러한 친구에게는 생일 값을주지 않습니다. – CBroe
이것은 내 모든 친구들을위한 것입니다. 왜 그런지 모르지만 생일은 배열에 표시되지 않습니다. – user1755741
그들은 아마도 자신의 생일 정보를 숨기고있을 것입니다. – Ron