Hi all, i want to fetch the friends by gender in my application i.e if
male then female (or) if female then male

If not opposite gender friends are present show same gender

the code is

if (gender == male){
        function loadFriends()
        {
        var req = opensocial.newDataRequest();
        var spec = opensocial.newIdSpec({"userId" : "OWNER", "groupId" :
"FRIENDS"});
        var params = {
        "max" : 50
        };
        params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[opensocial.Person.Field.PROFILE_URL];
        req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER),
"req");
        req.add(req.newFetchPeopleRequest(spec, params), "req_friends");
        req.send(onLoadFriends);
        };
}
else {
        function loadFriends()
        {
        var req = opensocial.newDataRequest();
        var spec = opensocial.newIdSpec({"userId" : "OWNER", "groupId" :
"FRIENDS"});
        var params = {
        "max" : 50
        };
        params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[opensocial.Person.Field.PROFILE_URL];
        req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER),
"req");
        req.add(req.newFetchPeopleRequest(spec, params), "req_friends");
        req.send(onLoadFriends);
        };
}




I was unable to fetch by gender please help me :)

--

You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.


Reply via email to