2012-10-22 80 views
2

我正在使用面向Android 3.0的Facebook SDK,我試圖做的是獲取10張朋友圖片。如何將限制參數添加到請求中?根據請求限制結果圖

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); 
+0

爲什麼向下票呢? – Alex

回答

4

若要僅獲取10張圖片的朋友請執行以下操作:

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

    requests.add(request); 
}