Sunday, July 27, 2008

mMySpace Developer Platform?

The MySpace Developer Platform is a combination of services that provides third party application developers with hooks into MySpace's data and functionality. These services include:

  • A suite of online tools for creating and publishing applications (and debugging them).set of RESTful APIs (provided in json, xml, and other formats as needed) that provide endpoints for browser-to-site and site-to-site interaction. These are implemented over the http protocol using a simple, intuitive uri scheme.
  • A mechanism for your application to exchange data with your own site.
  • A system for end users to find and install applications on their profiles.
  • Security mechanisms for protecting end users' identity, as well as communications verification between MySpace servers and your site.

OpenSocial + MySpace Developer Platform do they fit together?

OpenSocial and the MySpace Developer Platform are a series of JavaScript and server-side components that work together to provide you with a standard interface to write your apps against.

Your app is hosted in an IFrame and your code has a reference first to "opensocialreference.js", then to "MyOpenSpace.js"

MyOpenSpace.js is dependent on opensocialreference.js.

OpenSocial defines several basic social networking objects, as well as implementations for how to get and update those objects.

MyOpenSpace maps those objects to MySpace server-side API calls and it also extends the objects.

The following code is the official OpenSocial request for the friends of the "Owner" (the person who has installed the application):

function init()
{
var dataRequest = opensocial.newDataRequest();

//Create a request for the owner's friends
var friendRequest = dataRequest.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS);
//Add the request for processing.
dataRequest.add(friendRequest);
//Send the request, passing in a callback.
dataRequest.send(response);

}

0 comments: