hi,
i believe it is because a user can set privacy levels on "location"
and hence restrict who has access to it.
cheers,
shishir

On Jun 10, 5:13 am, Thyako <thy...@gmail.com> wrote:
> Hi.
>
> If you ask for current_location when fetching a person by ID (which
> has the app, of course), orkut only returns this field if the user is
> the viewer or owner of the app, at least in opensocial 0.7 in real
> production (not production sandbox).
>
> To test this, try fetching user information, including
> current_location for the VIEWER, for your own Opensocial ID and for a
> third person's Opensocial ID (which has the app). It is expected to
> get your own country twice and the third person's country. But the
> last is undefined.
>
> Or try the code below in OpenSocial Dev App running in real production
> (http://www.orkut.com.br/Main#AppInfo.aspx?appId=291092957065).
>
> This will fetch data of yourself as the viewer, of Lane 
> (http://www.orkut.com.br/Main#Profile.aspx?uid=6325640989800441941)
> and mine.
>
> If Lane do this test, he will get his country correctly both as the
> viewer and by his ID, but my country will be undefined, though I have
> the app installed (which can be confirmed fetching my details by ID
> using the "data viewer" tab).
>
> Also, check the request response in Firebug; It just doesn't come with
> location data.
>
> ~Thiago
>
> function request() {
>
>  var req = opensocial.newDataRequest();
>
>  var details = {};
>  details[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
> [
>      opensocial.Person.Field.PROFILE_URL,
>      opensocial.Person.Field.GENDER,
>      opensocial.Person.Field.CURRENT_LOCATION,
>      opensocial.Person.Field.THUMBNAIL_URL,
>      opensocial.Person.Field.RELATIONSHIP_STATUS,
>      opensocial.Person.Field.ABOUT_ME ];
>
>  req.add( req.newFetchPersonRequest
> (opensocial.DataRequest.PersonId.OWNER, details ), "owner");
>  req.add( req.newFetchPersonRequest("09952060504025502214", details ),
> "lane" );
>  req.add( req.newFetchPersonRequest("07594394517738456980", details ),
> "thiago" );
>  req.send( response );
>
> };
>
> function response(data) {
>  var owner = data.get("owner").getData();
>  var owner_loc = owner.getField
> (opensocial.Person.Field.CURRENT_LOCATION);
>  if(owner_loc != undefined) { output( owner_loc.getField
> ( opensocial.Address.Field.COUNTRY) ); }
>  else { output( "undefined for owner" ); }
>
>  var lane = data.get("lane").getData();
>  var lane_loc = lane.getField
> (opensocial.Person.Field.CURRENT_LOCATION);
>  if(lane_loc != undefined) { output( lane_loc.getField
> ( opensocial.Address.Field.COUNTRY) ); }
>  else { output( "undefined for lane" ); }
>
>  var thiago = data.get("thiago").getData();
>  var thiago_loc = thiago.getField
> (opensocial.Person.Field.CURRENT_LOCATION);
>  if(thiago_loc != undefined) { output( thiago_loc.getField
> ( opensocial.Address.Field.COUNTRY) ); }
>  else { output( "undefined for thiago" ); }
>
>  gadgets.window.adjustHeight();
>
> };
>
> request();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to