iFrame / Fb:friend-selector (autocomplete textbox) ?

Nov 20, 2007 at 3:06 PM
has anyone come up with an example of the facebook friend selector where they have a text box and you type in a friend's name, and a list appears below the textbox while you are typing?

I've tried to use ajax autocomplete textboxes using:

Dim SQLQuery As String = ""
SQLQuery += "SELECT name, uid "
SQLQuery += "FROM user "
SQLQuery += "Where "
SQLQuery += "(uid in (SELECT uid2 FROM friend WHERE uid1 ={0})) "
SQLQuery += "And (strpos(upper(name), upper('" & sSearchText & "')) >= 0) "
SQLQuery += "ORDER BY name"

fbApp.Service.Fql.ExecuteQuery(String.Format(SQLQuery, fbApp.UserID))

But this is WAAAAAYYY too slow.. nothing compared to the speed of the facebook one..

Has anyone created anything that compares to the speed of the standard FBML friend-selector?
Nov 23, 2007 at 8:43 PM
I haven't built anything for this but I imagine you could get the effect you want from the autocomplete textbox if you simply cached the results of the facebook friend select. It would probably still be a little slow on the first request but subsequent request would be a ton faster. If it's still too slow on as the user starts to type you'd have to pre-cache all the friend data.

make sense?

-dk