Hi Dustin,
I want to get only online friends of the owner. Can U help me?
Thanx
On Dec 12, 2007 11:33 PM, Dustin Jorge <dust...@gmail.com> wrote:
To get OWNER_FRIENDS use something like this:
var reqObj = opensocial.newDataRequest();
reqObj.add( reqObj.newFetchPeopleRequest("OWNER_FRIENDS"),'friends');
reqObj.send( handleReturn );
function handleReturn( dat ){
if(dat.get('friends').hadError()){
//**** do some error handling
return;
}
var friends = dat.get('friends').getData();
//**** friends is now of the type: opensocial.Collection
//**** Reference here:
http://code.google.com/apis/opensocial/docs/javascript/reference/opensocial.Collection.html
//**** Example:
var html = "";
friends.each( function( Person ){
html+=Person.getField(opensocial.Person.Field.NAME<http://opensocial.person.field.name/>
);
});
document.write(html);
}
If you want to get only owner friends who are currently online, that's
another story.
Martin Selva wrote:
I doubt its possible now. But later on once final api is out. you
might be able to get this by Profile Details.
On Dec 12, 2007 10:54 AM, ritu < ruch...@gmail.com
<mailto:ruch...@gmail.com>> wrote:
Hi,
I want to get all online friends of owner. Is it possible?
Thanx