Thanks Arne, but it's still not working. I've tried it in both Orkut
and iGoogle. Here's my code:

        function showAddressOfViewer(viewer) {
           var loc =
viewer.getField(opensocial.Person.Field.ADDRESSES);
           var address =
loc.getField(opensocial.Address.Field.EXTENDED_ADDRESS);
           var html = 'My address is ';
           html += (address ? address : 'not set');
           document.getElementById('my_addr').innerHTML = html;
        }

in Firebug, i'm getting: "loc has no properties"

In my profile, i've set up location information already, and I know
the viewer object has other properties, such as
viewer.getDisplayName().



On May 6, 2:10 pm, "Arne Roomann-Kurrik" <[EMAIL PROTECTED]>
wrote:
> The Addresses field is actually a property of each user object, so you would
> have to request the appropriate Person or Collection<Person> objects and
> then call
>
>   var addresses = person.getField(opensocial.Person.Field.ADDRESSES);
>
> From there, addresses will contain an array of each address object for the
> person, so you can loop over those fields and call
>
>   var ext_addr =
> address.getField(opensocial.Address.Field.EXTENDED_ADDRESS);
>
> Does that help?
>
> ~Arne
>
>
>
> On Tue, May 6, 2008 at 10:43 AM, Kwame <[EMAIL PROTECTED]> wrote:
>
> > Thanks Arne,
>
> > I'm working with Orkut right now. What I was needing to know was, say
> > for instance I and 10 of my friends all have an App installed, how can
> > ALL their addresses be listed for say 1. The owner, 2. the Viewer, and
> > then for all with the App to see. What does the App call, since
> > opensocial.Address.getField('EXTENDED_ADDRESS'), dosen't have a User
> > ID param  or something like that.
>
> > On May 6, 10:09 am, "Arne Roomann-Kurrik" <[EMAIL PROTECTED]>
> > wrote:
> > > Hi Kwame,
>
> > >   Which container do you use?  Depending on the container's policy, this
> > > information may not be available.  On orkut, for example, this
> > information
> > > is only returned for friends who also have the app installed.
>
> > > ~Arne
>
> > > On Tue, May 6, 2008 at 6:48 AM, Kwame <[EMAIL PROTECTED]> wrote:
>
> > > > I guess opensocial.Address.getField('EXTENDED_ADDRESS') can be used to
> > > > get the logged in users's address, but how do I get info for friends?
> > > > Any help would be appreciated. Thanks.
>
> > > --
> > > OpenSocial IRC - irc://irc.freenode.net/opensocial
>
> --
> OpenSocial IRC - irc://irc.freenode.net/opensocial
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to