X O M I N O

Here are a number of different example of how the jQuery Topkeninput can be used.

Out of the box typeahead.
Plain Vanilla all defaults With facebook styling with custom labels
Searching a local JSON list
search for "a"
Searching a REST feed of a notes view
Click (here) for the JSON
Twitter Feed (type Twitter id - e.g. xpages)

REST service, facebook styling code
$("#[id$=inputText3]").tokenInput("xTokeninput.xsp/contactjson", {
	propertyToSearch: "email",
	theme: "facebook"
});

Twitter Feed code
$("#[id$=inputText6]").tokenInput('https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true%26include_rts=true%26count=10', {
	propertyToSearch: "text",
	queryParam: "screen_name",
	hintText: "Type a twitter name e.g. edbrill, xpages or openntf",
	resultsFormatter: function(item){ return "<li>" + "<img src='" 
		+ item.user.profile_image_url + "' title='" 
		+ item.user.screen_name + "' height='40px' width='40px' />" 
		+ "<div style='display: inline-block; padding-left: 10px; width:80%'><div class='full_name'>" 
		+ item.text  + "</div></div></li>" },
	tokenFormatter: function(item) { return "<li>" + "<img src='" + item.user.profile_image_url 
	+ "' title='" + item.user.screen_name + "' height='40px' width='40px' />" 
	+ "<div style='display: inline-block; padding-left: 10px; width:80%'><div class='full_name'>" 
	+ item.text  + "</div></div></li>" },          
	onResult: function (results) {
		jQuery.each(results, function (index, value) {
			value.text = value.text.replace(/\(/g, '(').replace(/\)/g, ')');
		});
		return results;
	}
});