gpt4 book ai didi

android - 限制请求图的结果

转载 作者:太空宇宙 更新时间:2023-11-03 13:00:01 25 4
gpt4 key购买 nike

我正在使用适用于 Android 3.0 的 Facebook SDK,我想做的是获取 10 张 friend 的照片。如何在请求中添加限制参数?

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

最佳答案

要为 friend 只获取 10 张图片,请执行以下操作:

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

requests.add(request);
}

关于android - 限制请求图的结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13004429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com