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>