1

How can I select some friends using the Javascript API?

I'm working on a project where I want the user to select some friends which ID's I need, to display their profile images and names (among other things).

How do I do this?

Thank you in advance.

curly_brackets
  • 5,491
  • 15
  • 58
  • 102

2 Answers2

1

This is how I managed this...

$(".friendSelect").click(function () {
    FB.ui({ method: 'apprequests', message: 'Choose 9 friends!' }, function (response) {
        console.log(response) //The friends
    });
});
curly_brackets
  • 5,491
  • 15
  • 58
  • 102
0

This article explains how to get setup and using the Facebook javascript SDK. Once you've got that up and running you will want to get a FriendList object. From here you can then get a User object for each person in the FriendList.

You may want to try googeling 'javascript graph api tutorial' for code examples

Nathan
  • 791
  • 1
  • 8
  • 16