you can try doing this ..

*<script>*

gadgets.util.registerOnLoadHandler(request);

*function* request()
{
*var* htmlout="";
htmlout += "Owner id is:" + gadgets.util.getUrlParameters()["gadgetOwner"];
htmlout += "*<br />* Viewer id is:" +
gadgets.util.getUrlParameters()["gadgetViewer"];
*var* html=*document*.getElementById('msg');
html.innerHTML=htmlout;

}

*</script>*
*<div id='msg'>**</div>*

On Mon, Jan 26, 2009 at 8:09 PM, vick <jain.viv...@gmail.com> wrote:

>
> can you help me to display viewer's uid and owner's id when viewer is
> viewing a profile.
> it would br great if you can help me with this asap.
> cheers...
>
>
> On Jan 26, 4:43 pm, vick <jain.viv...@gmail.com> wrote:
> > thaanx alot...problem is solved....
> >
> > On Jan 26, 1:43 pm, Bert Van den Brande <cyr...@gmail.com> wrote:
> >
> > > You should indicate that you want ALL friends to be retrieved, default
> is 20.
> >
> > > Seehttp://
> code.google.com/apis/opensocial/docs/0.8/reference/#opensocial...
> >
> > > Code example from Chris Chabot :
> >
> > >   var req = opensocial.newDataRequest();
> > >   var spec = opensocial.newIdSpec({"userId" : "OWNER", "groupId" :
> "FRIENDS"});
> > >   var params = {
> > >     "max" : 1000
> > >   };
> > >   req.add(req.newFetchPeopleRequest(spec, params), "req_friends");
> >
> > > On Sat, Jan 24, 2009 at 7:12 AM, vick <jain.viv...@gmail.com> wrote:
> > > On Sat, Jan 24, 2009 at 7:12 AM, vick <jain.viv...@gmail.com> wrote:
> >
> > > > hi,
> > > > m using following code to retrive all friends..somehow i am able to
> > > > display only 20 friends!!!
> > > > help me...
> >
> > > > <script type="text/javascript">
> >
> > > >    function init(){
> > > >     request();
> > > >    }
> >
> > > >      function request() {
> > > >        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(response);
> > > >      };
> >
> > > >      function response(dataResponse) {
> > > >        var owner = dataResponse.get('get_owner').getData();
> > > >        var friends = dataResponse.get('get_friends').getData();
> > > >        var html = 'All rockstar Friends of ' + owner.getDisplayName
> > > > ();
> > > >        html += ':<br><ul>';
> > > >        friends.each(function(person) {
> > > >          html += '<li>' + person.getDisplayName() + '</li>';
> > > >        });
> > > >        friends.each(function(person) {
> > > >          html += '<li>' + person.getDisplayName() + '</li>';
> > > >        });
> > > >        html += '</ul>';
> > > >        document.getElementById('message').innerHTML = html;
> > > >      };
> >
> > > >      gadgets.util.registerOnLoadHandler(init);
> >
> > > >    </script>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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