MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Status And Mood Set/Update

Last post 11-16-2009 4:53 PM by Chad Russell. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-22-2009 12:08 PM

    Status And Mood Set/Update

    I have the javascript code to retrieve the mood and status in v0.8. Does anyone have and example or could point me in the right direction to update the mood and status using javascript.

    <script type="text/javascript">

    function init() {
         var os = opensocial.Container.get();
         var idSpec = opensocial.IdSpec.PersonId.VIEWER;
         var req = os.newDataRequest();

         var param = {};
         param[os.newFetchPersonMoodRequest(idSpec)] = "test";
         req.add(os.newFetchPersonStatusRequest(idSpec), "newFetchPersonStatusRequest") ;
         req.add(os.newFetchPersonMoodRequest(idSpec, param), "newFetchPersonMoodRequest");
         req.send(newFetchPersonStatusRequestCallback);
    }

    function newFetchPersonStatusRequestCallback(data)
    {
           var response = data.get('newFetchPersonStatusRequest').getData();
           var response1 = data.get('newFetchPersonMoodRequest').getData();
         
    }

    init();
    </script>

  • 11-16-2009 4:53 PM In reply to

    Re: Status And Mood Set/Update

     Hi, right now you actually can't update the status/mood from the javascript container.  We will look into adding this API (probably to the 0.9 container when it's done though, not legacy containers).

    Chad

Page 1 of 1 (2 items)