Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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);
like image 821
Alejandro Rangel Avatar asked Jan 28 '26 01:01

Alejandro Rangel


1 Answers

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);
}
like image 101
C Abernathy Avatar answered Jan 30 '26 18:01

C Abernathy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!