problem accessing Friends list using Personid

0 views
Skip to first unread message

sushant

unread,
Sep 8, 2008, 11:22:48 AM9/8/08
to Orkut Developer Forum

I am trying to access Friends list using person Id

var req = opensocial.newDataRequest();
req.add(req.newFetchPeopleRequest(psersonId), 'key');


but keep getting error. My questions.

- Is it necessary to have the app installed , if i want to get
the count of friends for one of my friends.

- Can i access the coolness and sexy rating of any of my
friends. ?



Ramanpreet Singh

unread,
Sep 9, 2008, 12:57:24 AM9/9/08
to opensoci...@googlegroups.com
Hi Sushant

No buddy, you can't access the friend list through a person's ID.
With Opensocial API 0.7 (current version orkut is running), you can only
get OWNER_FRIENDS or VIEWER_FRIENDS.
Check this
http://code.google.com/apis/opensocial/docs/0.7/devguide.html#ListFriends_Complete
.

sushant

unread,
Sep 9, 2008, 8:15:40 AM9/9/08
to Orkut Developer Forum
I saw this links. As per specs of open-social 0.7 i should be able
to pass Id or array of Ids to get Friends list. I am not sure if
this is a bug or per design.

Basically i want to count the number of friends each of my friends
have. Is there anyway i can do that ?

- sushant -

On Sep 9, 12:57 am, Ramanpreet Singh <ramandhin...@gmail.com> wrote:
> Hi Sushant
>
> No buddy, you can't access the friendlistthrough a person's ID.
> With Opensocial API 0.7 (current version orkut is running), you can only
> get OWNER_FRIENDS or VIEWER_FRIENDS.
> Check thishttp://code.google.com/apis/opensocial/docs/0.7/devguide.html#ListFri...
> .
>
> sushant wrote:
> > I am trying to accessFriendslistusingperson Id

Ramanpreet Singh

unread,
Sep 9, 2008, 8:53:11 AM9/9/08
to opensoci...@googlegroups.com
Ah yes Sushant, you are right.
But, i havent ever used it this way myself. So, can't say what d issue
is. Anyone?

Jason

unread,
Sep 10, 2008, 5:16:35 PM9/10/08
to Orkut Developer Forum
No, you can only get the list of friends for the application owner
(OWNER) or the current user (VIEWER) and only if the current user has
the application installed. You cannot get the friends of an arbitrary
user at this time, so counting the number of friends of each friend in
your friend list isn't possible, at least not directly.

newFetchPersonRequest and newFetchPeopleRequest can take in a single
OpenSocial ID and array of IDs respectively, but these fetch data for
the persons corresponding to the IDs, NOT the friends of these
persons. And if a given person does not have the application
installed, no personal information (e.g. name, gender, etc.) will be
accessible to your application, making it mostly useless.

- Jason

sushant

unread,
Sep 12, 2008, 4:12:03 PM9/12/08
to Orkut Developer Forum
The app i was trying to create called "Popularity Check" would list
down owners friends with sorting and paging capability on data-
points count of friends, coolness rating , sexy rating, etc.

Seems like none of these is possible right now.

What i am trying to do , does that qualify as social app at all ?

- Sushant -


On Sep 10, 5:16 pm, Jason <apija...@google.com> wrote:
> No, you can only get the list of friends for the application owner
> (OWNER) or the current user (VIEWER) and only if the current user has
> the application installed. You cannot get the friends of an arbitrary
> user at this time, so counting the number of friends of each friend in
> your friend list isn't possible, at least not directly.
>
> newFetchPersonRequest and newFetchPeopleRequest can take in a single
> OpenSocial ID and array of IDs respectively, but these fetch data for
> the persons corresponding to the IDs, NOT the friends of these
> persons. And if a given person does not have the application
> installed, no personal information (e.g. name, gender, etc.) will be
> accessible to your application, making it mostly useless.
>
> - Jason
>
> On Sep 9, 5:15 am,sushant<sushant.s...@gmail.com> wrote:
>
> > I saw this links. As per specs of open-social 0.7 i should be able
> > to pass Id or array of Ids to get Friends list. I am not sure if
> > this is a bug or per design.
>
> > Basically i want to count the number of friends each of my friends
> > have. Is there anyway i can do that ?
>
> > -sushant -

Jason

unread,
Sep 15, 2008, 5:37:50 PM9/15/08
to Orkut Developer Forum
Yes, this would be quality as social, and there are similar
applications in the directory already. Even though you don't have
access to the entire friends-of-friends, you could certainly build an
app that lets users rate and sort their own friends if they install
your app.

- Jason
Reply all
Reply to author
Forward
0 new messages