curly_brackets
curly_brackets

Reputation: 5598

Select friends dialog

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.

Upvotes: 1

Views: 1851

Answers (2)

curly_brackets
curly_brackets

Reputation: 5598

This is how I managed this...

$(".friendSelect").click(function () {
    FB.ui({ method: 'apprequests', message: 'Choose 9 friends!' }, function (response) {
        console.log(response) //The friends
    });
});

Upvotes: 1

Nathan
Nathan

Reputation: 791

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

Upvotes: 0

Related Questions