MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in
Blogs from the OpenSocial JS Container Team

MyOpenSocial.Widgets - FriendPicker

In the spirit of making your lives easier, we are introducing...
    drum roll please...

The MyOpenSocial.Widgets library.

You may be familiar with FriendPicker from the original PostTo sample application.
Now, instead of filling your app up with tons of code cruft you can make a few simple calls for the same functionality:

//at top of file
MyOpenSpace.ClientLibraries.includeScript(
MyOpenSpace.ClientLibraries.Scripts.MYSPACE_WIDGETS);

...
//later in a registered init
var myFriendPicker = new MyOpenSpace.Widgets.FriendPicker(
{
element: "pickerDiv01",
buildSelectedUI: true
});

...
//and when you want to see what you have
var pickedPerson = myFriendPicker.selectedFriend;

http://www.myspace.com/myopensapcewidgetsamples

This is early in development, so if you find issues leave comments here or in the forums.
Also, check back in to this app periodically for new widgets as we release them.

Comments

 

Sebastian said:

Is the UI supposed to render in IE 7? I can only see it in firefox

April 27, 2008 10:30 AM
 

TK's Apps said:

What else can MyOpenSpace.ClientLibraries.includeScript be used for? That looks very useful.

April 27, 2008 5:02 PM
 

Eddie said:

Can I ask whether these widgets and postto check whether the 'friend' has blocked the app? If not can they?

May 1, 2008 12:33 AM
 

Guitarati said:

The widget seems to load only top friends. How do we load all friends?

May 21, 2008 10:14 AM