MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

PeopleRequestFields.FIRST don't supported?

Last post 06-27-2009 7:34 PM by Michael. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-17-2009 3:20 AM

    PeopleRequestFields.FIRST don't supported?

     Hi all,

     i'm trying to include paging in to my getUserFriends-Function. With PeopleRequest.Fields.Max i can get more than 20 friends, but how can i use paging if PeopleRequestFields.FIRST does not works?

    Here is my code:

    var idspec = opensocial.newIdSpec({ "userId": "VIEWER", "groupId": "FRIENDS" });
    var req = opensocial.newDataRequest();

    var params = {};
    params[opensocial.DataRequest.PeopleRequestFields.MAX] = 5
    params[opensocial.DataRequest.PeopleRequestFields.FIRST] = 10
           
    req.add(req.newFetchPeopleRequest(idspec, params), "friendData");
    req.send(this.processUserFriends);

     As soon as i specify the FIRST-Params, i get an error ("Error calling method on NPObject!").

    Any ideas or hints?

     Thanks in advanced. Best regards,

    André

  • 06-19-2009 4:44 PM In reply to

    Re: PeopleRequestFields.FIRST don't supported?

    may wanna check out the demo apps in the gallery for .7 and .8 apps :)

  • 06-21-2009 11:41 PM In reply to

    Re: PeopleRequestFields.FIRST don't supported?

     i had a problem getting paging to work too, i just set the max to 1000, and put all of the friends in an array, and wrote my own paging function... blahh i realized that the limit on the MAX friends you can retrieve is 100... so i had to go and figure out the FIRST param

  • 06-27-2009 7:34 PM In reply to

    Re: PeopleRequestFields.FIRST don't supported?

    k change the 10 to an 11 and it should work, i struggled with this for weeks, it has to fit into a paging equation for some reason {ex. pageSize * (pageNum - 1) +1 } or it doesnt work... i dont get it, but thats how it works, i just had to write my own method, and now that i know what was wrong i have to rewrite a lot of code
Page 1 of 1 (4 items)