问题
Earlier when I open graph.facebook.com, I can get the ID's of all the friends of mine at one place but now I am getting redirect to another developer page.

I want to know whether any method still left by which I can get the friend's ID at once. I know that graph.facebook.com/username
feature, but I want to have all at once.
回答1:
Here is an example using the facebook-php-sdk that will return the id number for all your friends from within your application:
include_once('facebook-php-sdk/src/facebook.php');
$facebook = new Facebook(array(
'appId' => '<your_app_id>',
'secret' => '<your_app_secret>',
));
$result = $facebook->api("/me/friends?limit=0");
$friends = array();
foreach ($result['data'] as $index => $friend) {
$friends[] = $friend['id'];
}
回答2:
The path graph.facebook.com/[user id]?fields=friends.fields(id)
will get what you want. You just have to make sure to send the appropriate credentials.
I recommend you use Facebook's Graph Explorer tool. It is handy to select what you want.
http://developers.facebook.com/tools/explorer/?method=GET&path=511552816%3Ffields%3Did%2Cname
来源:https://stackoverflow.com/questions/14404089/how-to-get-all-facebook-friends-id-at-once