Retrieving friends info using Facebook API [duplicate]
Possible Duplicate:
How to get all friends name, id, birthday, location, etc.. from facebook API in android?
I am trying to set up a Facebook application where I have to compare the information of the user with his friends. I do not know how to retrieve the friends information such as birthday, hometown, etc. I tried using
$faceb开发者_运维问答ook->api('/Friend_ID')
but this is not working. However I have already set up the extended permissions. Only to retrieve the information, I am unable to do this.. Can you please guide me?
What does Facebook respond for your request '/FriendID' ?
Are you sure the answer is what you expect? I'm not sure for the friendId response, but you could use another method such as user information
$friendsIds = array(1,2,3);
$requestInfo = array(
'method' => 'users_getInfo',
'friends' => $friendsIds,
'user_info' => array('last_name', 'first_name', 'uid', 'birthday')
)
$userDetails = $facebook->api->($requestInfo);
print_r($userDetails);
You can test it or an appropriate code to your schedule, I only explained the idea of how you can get what you want
精彩评论