[OpenSocial] Re: Null fields

2008-06-19 Thread Zach

Thanks for the help, I believe I'm on the right track now.

On Jun 19, 12:13 pm, Zach <[EMAIL PROTECTED]> wrote:
> Thank you for the reply.  Unfortunately, I'm still a little confused.
> When I get the NAME field back it outputs [object Object].  This might
> be a dense question, but how do I get the actual name out of this
> object that's coming back?  I've tried toString and other methods, but
> I'm about out of ideas.
>
> On Jun 19, 10:45 am, Aakash Bapna <[EMAIL PROTECTED]> wrote:
>
> > Hi Zach,
>
> > first of all you forgot to add the params variable to your request.
> > req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER,params),'owner');
> > you can get the ID of the person just by owner.getId()To know more on what 
> > fields you have access to check 
> > outhttp://docs.google.com/Present?docid=dd5dv8xk_11dz8824x7
> > Thanks ~Aakashhttp://aakash-bapna.blogspot.com
>
> > > Date: Thu, 19 Jun 2008 05:58:32 -0700> Subject: [OpenSocial] Null fields> 
> > > From: [EMAIL PROTECTED]> To: opensocial-api@googlegroups.com> > > 
> > > Wondering if anybody might be able to show me where I'm screwing up> 
> > > here. Everything I get back using getField() is either null or> 
> > > undefined. The only thing that seems to work is getDisplayName().> > 
> > > gadgets.util.registerOnLoadHandler(init);> > function loadFriends() {> > 
> > > var req = opensocial.newDataRequest();> var params = {};> 
> > > params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]=> 
> > > [opensocial.Person.Field.ID,> opensocial.Person.Field.NAME,> 
> > > opensocial.Person.Field.GENDER,> opensocial.Person.Field.REGION];> > > > 
> > > req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),>
> > >  'owner');> > > 
> > > req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS,>
> > >  params), 'ownerFriends');> req.send(onLoadFriends);> > }> > function 
> > > onLoadFriends(data) {> > var owner = data.get('owner').getData();> var 
> > > ownerFriends = data.get('ownerFriends').getData();> var content = 
> > > document.getElementById('content');> var username = 
> > > document.createElement('div');> var userbody = 
> > > document.createElement('div');> var userleft = 
> > > document.createElement('div');> var userright = 
> > > document.createElement('div');> var name = owner.getField( 
> > > opensocial.Person.Field.NAME );> alert(name);> > 
> > > username.setAttribute("class", "username");> 
> > > username.setAttribute("className", "username");> 
> > > userbody.setAttribute("class", "userbody");> 
> > > userbody.setAttribute("className", "userbody");> 
> > > userleft.setAttribute("class", "userleft");> 
> > > userleft.setAttribute("className", "userleft");> 
> > > userright.setAttribute("class", "userright");> 
> > > userright.setAttribute("className", "userright");> > username.innerHTML = 
> > > owner.getDisplayName() + "";> > userleft.innerHTML = 
> > > "Name:Location:Email:General> Info:";> 
> > > userright.innerHTML = owner.getField(opensocial.Person.Field.NAME) +> 
> > > "";> > alert(owner.getField(opensocial.Person.Field.ID));> 
> > > alert("Name: " + owner.getField(opensocial.Person.Field.NAME));> 
> > > alert(owner.getField(opensocial.Person.Field.ABOUT_ME));> > 
> > > userbody.appendChild(userleft);> userbody.appendChild(userright);> 
> > > content.appendChild(username);> content.appendChild(userbody);> > }> > 
> > > function init() {> loadFriends();> }> > Fairly bumfuzzled,> -Zach> 
> > > _
>
> > Introducing Live Search cashback .  It's search that pays you 
> > back!http://search.live.com/cashback/?&pkw=form=MIJAAF/publ=HMTGL/crea=int...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~--~~~~--~~--~--~---



[OpenSocial] Re: Null fields

2008-06-19 Thread Zach

Thank you for the reply.  Unfortunately, I'm still a little confused.
When I get the NAME field back it outputs [object Object].  This might
be a dense question, but how do I get the actual name out of this
object that's coming back?  I've tried toString and other methods, but
I'm about out of ideas.

On Jun 19, 10:45 am, Aakash Bapna <[EMAIL PROTECTED]> wrote:
> Hi Zach,
>
> first of all you forgot to add the params variable to your request.
> req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER,params),'owner');
> you can get the ID of the person just by owner.getId()To know more on what 
> fields you have access to check 
> outhttp://docs.google.com/Present?docid=dd5dv8xk_11dz8824x7
> Thanks ~Aakashhttp://aakash-bapna.blogspot.com
>
> > Date: Thu, 19 Jun 2008 05:58:32 -0700> Subject: [OpenSocial] Null fields> 
> > From: [EMAIL PROTECTED]> To: opensocial-api@googlegroups.com> > > Wondering 
> > if anybody might be able to show me where I'm screwing up> here. Everything 
> > I get back using getField() is either null or> undefined. The only thing 
> > that seems to work is getDisplayName().> > 
> > gadgets.util.registerOnLoadHandler(init);> > function loadFriends() {> > 
> > var req = opensocial.newDataRequest();> var params = {};> 
> > params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]=> 
> > [opensocial.Person.Field.ID,> opensocial.Person.Field.NAME,> 
> > opensocial.Person.Field.GENDER,> opensocial.Person.Field.REGION];> > > > 
> > req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),> 
> > 'owner');> > > 
> > req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS,>
> >  params), 'ownerFriends');> req.send(onLoadFriends);> > }> > function 
> > onLoadFriends(data) {> > var owner = data.get('owner').getData();> var 
> > ownerFriends = data.get('ownerFriends').getData();> var content = 
> > document.getElementById('content');> var username = 
> > document.createElement('div');> var userbody = 
> > document.createElement('div');> var userleft = 
> > document.createElement('div');> var userright = 
> > document.createElement('div');> var name = owner.getField( 
> > opensocial.Person.Field.NAME );> alert(name);> > 
> > username.setAttribute("class", "username");> 
> > username.setAttribute("className", "username");> 
> > userbody.setAttribute("class", "userbody");> 
> > userbody.setAttribute("className", "userbody");> 
> > userleft.setAttribute("class", "userleft");> 
> > userleft.setAttribute("className", "userleft");> 
> > userright.setAttribute("class", "userright");> 
> > userright.setAttribute("className", "userright");> > username.innerHTML = 
> > owner.getDisplayName() + "";> > userleft.innerHTML = 
> > "Name:Location:Email:General> Info:";> 
> > userright.innerHTML = owner.getField(opensocial.Person.Field.NAME) +> 
> > "";> > alert(owner.getField(opensocial.Person.Field.ID));> alert("Name: 
> > " + owner.getField(opensocial.Person.Field.NAME));> 
> > alert(owner.getField(opensocial.Person.Field.ABOUT_ME));> > 
> > userbody.appendChild(userleft);> userbody.appendChild(userright);> 
> > content.appendChild(username);> content.appendChild(userbody);> > }> > 
> > function init() {> loadFriends();> }> > Fairly bumfuzzled,> -Zach> 
> > _
>
> Introducing Live Search cashback .  It's search that pays you 
> back!http://search.live.com/cashback/?&pkw=form=MIJAAF/publ=HMTGL/crea=int...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~--~~~~--~~--~--~---



[OpenSocial] Null fields

2008-06-19 Thread Zach

Wondering if anybody might be able to show me where I'm screwing up
here.  Everything I get back using getField() is either null or
undefined.  The only thing that seems to work is getDisplayName().

gadgets.util.registerOnLoadHandler(init);

function loadFriends() {

  var req = opensocial.newDataRequest();
  var params = {};
  params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]=
[opensocial.Person.Field.ID,
 opensocial.Person.Field.NAME,
 opensocial.Person.Field.GENDER,
 opensocial.Person.Field.REGION];


 
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),
'owner');

 
req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS,
  params), 'ownerFriends');
  req.send(onLoadFriends);

}

function onLoadFriends(data) {

  var owner = data.get('owner').getData();
  var ownerFriends = data.get('ownerFriends').getData();
  var content = document.getElementById('content');
  var username = document.createElement('div');
  var userbody = document.createElement('div');
  var userleft = document.createElement('div');
  var userright = document.createElement('div');
  var name = owner.getField( opensocial.Person.Field.NAME );
  alert(name);

  username.setAttribute("class", "username");
  username.setAttribute("className", "username");
  userbody.setAttribute("class", "userbody");
  userbody.setAttribute("className", "userbody");
  userleft.setAttribute("class", "userleft");
  userleft.setAttribute("className", "userleft");
  userright.setAttribute("class", "userright");
  userright.setAttribute("className", "userright");

  username.innerHTML = owner.getDisplayName() + "";

  userleft.innerHTML = "Name:Location:Email:General
Info:";
  userright.innerHTML = owner.getField(opensocial.Person.Field.NAME) +
"";

  alert(owner.getField(opensocial.Person.Field.ID));
  alert("Name: " + owner.getField(opensocial.Person.Field.NAME));
  alert(owner.getField(opensocial.Person.Field.ABOUT_ME));

  userbody.appendChild(userleft);
  userbody.appendChild(userright);
  content.appendChild(username);
  content.appendChild(userbody);

}

function init() {
  loadFriends();
}

Fairly bumfuzzled,
-Zach
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~--~~~~--~~--~--~---



[OpenSocial] Friends not appearing

2008-06-18 Thread Zach

Hey all,

I've read up on getting opensocial to display friends in a gadget, but
I still can't get it to work.  I'm using the example code from the
tutorial, and I'm testing it in the orkut sandbox.  I've got two
accounts on orkut, each registered as developers so that they are
whitelisted.  I cannot, however, get the friend to be listed.  Any
ideas on what I might be missing here?

Thanks.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~--~~~~--~~--~--~---



[OpenSocial] Re: Global vs. Instance vs. Person App Data

2007-11-13 Thread Zach

Dustin - thank you for the incredibly useful reply!  I now understand
the differences and this should help those in the future confused by
the same things.


On Nov 13, 12:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Imagine you created a gameappand would like to storedatafor it.
>
> GlobalData: Thisdatais available on a large scale, that is, it is
> available to your application regardless of where it is placed. Forinstance, 
> if Jane and Jill both place your game application on their
> profile, the globaldataset and retrieved will be exactly the same
> for both Jane and Jill's copy of the game. This could be useful for
> storing something like High Scores.
>
> InstanceData: Thisdatais available only to the specific copy
> (instance) of the game (app). So if Jane and Jill both place your game
> on their profile, the game will be able to store uniquedata. In this
> case, Jane's game cannot access Jill's game's uniquedatastorage
> (instanceData) and likewise. An example use for this may be if a game
> requires the 'state' of the game to be saved or you would like to keep
> High Scores separated for eachinstance.
>
> PersonAppData: relates to adatastore for an individual with
> relation to theappon a global scale. Meaning that both Jill and
> Jane's copy of the game will be able to access the samedatafor a
> Person, but other applications will not have access to your
> application'sdatafor that person. The key here is that you're
> storingdataunder a person with relation to anapp. So if you try to
> access thatdatafor the same person from a differentapp, it won't
> exist. An example use would be 'High Scores for Jill' (or jane), or
> allowing users to save their game.
>
> On Nov 10, 6:12 pm, Zach <[EMAIL PROTECTED]> wrote:
>
> > I'm sure I'm just not looking in the right place, but I can't seem to
> > find any description of what the differences between the Global,
> >Instance, and Person versions of Persistentdataare.  Can anyone
> > explain what each one is?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"OpenSocial API Definition (was OpenSocial Developers)" group.
To post to this group, send email to opensocial-api@googlegroups.com
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
-~--~~~~--~~--~--~---



[opensocial] Global vs. Instance vs. Person App Data

2007-11-10 Thread Zach

I'm sure I'm just not looking in the right place, but I can't seem to
find any description of what the differences between the Global,
Instance, and Person versions of Persistent data are.  Can anyone
explain what each one is?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Developers" group.
To post to this group, send email to opensocial-api@googlegroups.com
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
-~--~~~~--~~--~--~---