I’m experimenting with making a Facebook web app. What I want to do is have one of those popup dialogs that let you select from all your friends. The user selects some friends, and when they click OK, the IDs of the friends select get stored into a Javascript array.
It looks like I could use FB.ui, but the examples I’ve seen are all requests, like posting on a wall or inviting someone to a page. I just want to load those IDs into an array. How can this be done?
You can use something like jQuery Facebook Multi-Friend Selector or implement it yourself using response from
friendsconnection ofuseras source for data.FB.uiisn’t really going to help you since it’s not providing a way of displaying users in a UI that you wish for functionality other than Requests.If you’re going with jQuery Facebook Multi-Friend Selector it’s as simple as adding
<div id="jfmfs-container"></div>to your page and using next JavaScript: