Friend Selector

Mar 1, 2008 at 4:52 PM
How can I get the same FBML friend selector in Facebook ToolKit?

thanks a lot
Mar 4, 2008 at 5:28 PM
you can stick any FBML you like into the .aspx file of your app (provided it's a FBML app as opposed to an iframe app)

As such, you can just use the code provided here:
Mar 4, 2008 at 8:54 PM
Im using IFrame, it does NOT work with IFrame

any other suggestions?

Mar 4, 2008 at 10:10 PM
Edited Mar 5, 2008 at 12:46 PM

Sorry and thank you, Zeus.
Mar 5, 2008 at 9:15 AM
Mar 5, 2008 at 11:51 AM
but I think I mentioned that I need a friend-selector, NOT a multi friend selector which shows 20 friends per page with their profiles' photos.

I need the small friend selector to be used inisde the application, NOT in the invitation page.

Mar 5, 2008 at 11:59 AM
Edited Mar 5, 2008 at 12:09 PM
I've not seen any examples of such a thing. you may find you'll have to render your own.

grab the users friends through the api with something similar to (syntax may be incorrect for you):

Collection<Facebook.Entity.User> AppUserFriends = this.FBService.GetFriendsAppUsers();

Then use the results to create your own selector object, in any way you see fit.

It may also be helpful to look at the FBTK FriendList User Control, you could bind AppUserFriends to it to display which of the user's friends has the app added.
Mar 5, 2008 at 12:54 PM
Thanks mate,
Ive already designed my own.

but I was wondering if there is a way to get a selector looks like the FB selector exactly.

Mar 5, 2008 at 3:18 PM
only way I can think of would be to rip the HTML the FBML generates exactly... you can do that here:

if you find the FBML for the Friendlist in the documentation, and then stick it in the test console, you will be able to see what HTML it renders. You may then be able to copy that and use it in your own selector object. I dont know if that'd work, but it's certainly worth a try! :)

e.g. the example from the FBML wiki renders as:

<input name="uid" idname="friendsel" value="Start typing a friend's name" class="inputtext typeaheadplaceholder" maxlength="100" size="25" autocomplete="off" type="input" onfocus="var typeaheadsourceinstance1=new friendsource('123445-1204690390-1&u=123445');new FBML.friendSelector(this, typeaheadsourceinstance1,{shoulduse_absolute:1});" />
Mar 8, 2008 at 9:07 PM
Thanks mate, great idea.

do you know which javascript files I have to include?

Mar 10, 2008 at 10:38 AM
I'm afraid I dont, no... sorry! might be worth looking at the source code of an existing app and seeing what gets rendered? It may also be worth looking into the Javascript library Facebook provide, although I think that may just be for animation.
Mar 11, 2008 at 4:33 PM
check these links;