Alejandro Rangel
Alejandro Rangel

Reputation: 1670

limit results on request graph

I am using the Facebook SDK for Android 3.0, what I am trying to do is get 10 pictures of friends. How can I add the limit parameter to the request?

for (GraphUser user : users) {
  Request request = Request.newGraphPathRequest(
    session,user.getId()+"/photos",new Request.Callback(){...});

  //requests is a collection of requests
  requests.add(request);
}
Request.executeBatchAsync(requests);

Upvotes: 3

Views: 902

Answers (1)

C Abernathy
C Abernathy

Reputation: 5523

To get only 10 pictures for a friend do the following:

    Bundle params = new Bundle();
    params.putString("limit", "10");
    request.setParameters(params);

    requests.add(request);
}

Upvotes: 5

Related Questions