Foo

PostTo Sample Application

PostTo Sample Application

PostTo is an extension to the OpenSocial container which allows deeper interactivity with the MySpace system. Toggle the Intro for more information, or just View Source and play around.

Javascript snippets to the right give a clue as to how this works. If you view source on this frame you'll get a deeper clue. Source has been updated to use standard OpenSocial calls, like opensocial.requestSendMessage and opensocial.requestShareApp.

Toggle Intro

Post Target:
OpenSocial extensions - PostTo
var os_token = MyOpenSpace.MySpaceContainer.OSToken;
window.osContainer = opensocial.Container.get();
var message = opensocial.newMessage(content);

message.setField(opensocial.Message.Field.TITLE, subject);
message.setField(opensocial.Message.Field.TYPE, postType);

var recipientPerson = window.friendPicker.selectedFriend;

osContainer.postTo(os_token, message, recipientPerson);		

To YOUR account



To a friend
(recipient required)



To
MySpace Friend Picker (copy embedded script for now - external lib coming)
MyOpenSpace.Widgets.Bootstrapper.createWidget("MyOpenSpace.Widgets.FriendPicker", 
	function(p){window.friendPicker = p;},
	{
		element: "pickerDivID",
		friendClickAction: pickedOne
	});
Subject
Content