Friend zone is a jquery plugin that lets you add Facebook-style autocomplete to any webpage.
- It's fast.
- It virtually identically to Facebook's search bar.
- It's already styled like the Facebook search bar.
So you want to socially synergize your web-3.0 ontology with an integrated social graph and HTML5? Your users are logged in using the Facebook javascript SDK?
Awesome sauce. All you gotta do is add an input form to your page:
<input type="text" id="friend-search" />
... then add the following somewhere after jquery's been loaded:
$(function() {
FB.api('/me/friends', function(response) {
new FriendSearch('#friend-search', response.data);
});
});
$("#friend-search").on('selected', function(e, friendId) {
console.log(friendId + " says, 'What's up, dawg?'");
});
That's it!