Hi everyone,

I am new to the Opensocial API and am trying to implement it in a UWA widget.
The questions may appear to be completely "rookie" like.
I want to know certain things about the advantages and methodology of
making a UWA widget opensocial enabled.

The widget becomes opensocial enabled once the meta tag

 <meta name="opensocial" content="0.8" />

 is introduced.
Previously for fetching people into my widget from my app I was using
UWA.Data.request, providing my actionclassURL, passing the user
details and getting my data.
Now after I make the widget Opensocial enabled, how do I connect to my
Action class.
I get the part where I create the Idspec, add
newFetchPersonRequest()....see below

MyWidget.request = function() {
      var idspec = opensocial.newIdSpec({ "userId" : "OWNER",
"groupId" : "FRIENDS" });
      var req = opensocial.newDataRequest();
      req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER),
"get_owner");
      req.add(req.newFetchPeopleRequest(idspec), "get_friends");
        req.send(MyWidget.response);
    };

and parse the response,

MyWidget.response = function(dataResponse) {
      var owner = dataResponse.get('get_owner').getData();
      var friends = dataResponse.get('get_friends').getData();
      var html = 'Friends of ' + owner.getDisplayName();
      html += ':<br><ul>';
      friends.each(function(person) {
        html += '<li>' + person.getDisplayName() + '</li>';
      });
      html += '</ul>';
      // document.getElementById('message').innerHTML = html;
  // original sample code
      widget.body.getElementsByClassName('message')[0].innerHTML =
html; // UWA equivalent
    };

But where do I go to my Actionclass???
Where do I pass the user details??
Will Shindig come into picture here and what part will it play??

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to opensocial-api@googlegroups.com
To unsubscribe from this group, send email to 
opensocial-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to