MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Unsupported idspec using newFetchPeopleRequest...

Last post 04-16-2008 3:44 PM by ZeroSleep. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-16-2008 3:15 PM

    Unsupported idspec using newFetchPeopleRequest...

    Let's say I have a thousand friends who all use my app. I want to one-off from script pull a friend by ID from collection of friends. 

    The docs say:

    An ID, array of IDs, or a group reference used to specify which people to fetch; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, or a single ID within one of those groups.

    " single ID within one of those groups " this would be valid for one of my friends within owner friends. Am I misunderstanding the whole thing?

    I've seen forum posts asking how to get information from non-friends, but nothing explicitly answering the question: "Can I pull a single friend from OWNER_FRIENDS".

    Sample Code:

    <script type="text/javascript">
    function onDataResponse(data) {
      var d_person = data.get('person');
      if (data.hadError()) {
        alert(d_person.getErrorMessage());   
      }
      else {
        var friend = d_person.getData();
        alert(friend);
      }
    }
    var req = opensocial.newDataRequest();
    var ids = ["357590058"];
    req.add(req.newFetchPeopleRequest(ids), 'person');
    req.send(onDataResponse);
    </script>

  • 04-16-2008 3:44 PM In reply to

    Re: Unsupported idspec using newFetchPeopleRequest...

     After some digging, it appears Jeremy already answered this:

    http://developer.myspace.com/Community/forums/p/1159/6200.aspx#6200 

     "... the one thing MySpace does not allow for is the "single ID within one of those groups" (i.e. a single ID from one of the groups of friends) - but that's because there currently is no backend check to see if a user has the App installed (this can only be checked upon the reciept of return, which will be an error)... "

    The HAS_APP filter is supported now right? If so, any chance this restriction an be lifted? Am I correct to assume that my options are to use the REST API instead?

Page 1 of 1 (2 items)