friend set logic for opensocial

0 views
Skip to first unread message

justin kruger

unread,
May 2, 2008, 11:31:30 AM5/2/08
to opensoc...@googlegroups.com
it seems to me to be a bit silly to have such large friend lists
returned. are their any functions to do some set logic on the server?

for example:
#how would you efficiently find all friends in common between the
viewer and the owner? (on sites like myspace, friend lists can be in
the 10s of thousands.)
-would the strategy follow a paging option?

#what is the most effective way to determine if the viewer is the
owner? right now you have to get the id for both, and then check.
this seems odd. if you continue down this logic.
#what is the most effective way to determine if the viewer is a friend
of the owner?
#....is a friend of a friend of the owner?

--
--
Justin Kruger
http://jDavid.net
jDavi...@gmail.com

"If you are successful, it is because somewhere, sometime, someone
gave you a life or an idea that started you in the right direction.
Remember also that you are indebted to life until you help some less
fortunate person, just as you were helped." --Melinda Gates

Marc Wessely

unread,
May 3, 2008, 10:23:58 AM5/3/08
to opensoc...@googlegroups.com
there is a paging option, have a look at opensocial documentation.
you can pass a parameter for the first say 20 friends to show.



2008/5/2 justin kruger <justin...@gmail.com>:

Aakash Bapna

unread,
May 3, 2008, 1:22:15 PM5/3/08
to opensoc...@googlegroups.com
Hi Justin,
 
# the best way to check if a person is owner is to use the person.isOwner() method, rather than getting there id's and comparing them.
# to check for friends there is no way now other than iterating through all friends, v0.8 will bring some solution this and also for friends of friends.. take a look at these threads for the accepted proposal- http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/95570a27ab945f6d/65d409d017107cfb ,
http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/6b2ba00f8a38cb45/4374c5e1e22eaacf


Thanks
 
~@@k@sh
http://aakash-bapna.blogspot.com





> Date: Fri, 2 May 2008 10:31:30 -0500
> From: justin...@gmail.com
> To: opensoc...@googlegroups.com
> Subject: [OpenSocial] friend set logic for opensocial

justin kruger

unread,
May 3, 2008, 3:16:58 PM5/3/08
to opensoc...@googlegroups.com
cool, thank you.
Reply all
Reply to author
Forward
0 new messages