如何检索标记了一个人的所有Facebook照片 [英] How to retrieve ALL Facebook photos a person is tagged in

查看:180
本文介绍了如何检索标记了一个人的所有Facebook照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以将limit和offset值附加到graph.facebook.com/id/photos API调用中以对照片进行分页.但是很大的限制似乎效果不佳,照片最终丢失了.我在这里看到limit = 0会给您所有照片,但是照片将再次丢失.那么,您可以可靠使用的最大限制是多少?有效检索所有照片的正确方法是什么?

I know you can append limit and offset values to the graph.facebook.com/id/photos API call to paginate through photos. But large limits don't seem to work well, photos end up missing. I read here that limit=0 gives you all photos, but again photos will be missing. So what's the biggest limit you can use reliably? What's the proper way to efficiently retrieve ALL photos?

是否有关于限制范围的文档?

Is there documentation on the limits of limit?

推荐答案

这是我使用Facebook API的经验...

Here's my experience with the Facebook API...

如果设置了限制,那么您所获得的将不会更多.但是,尽管存在更多限制,但很大的限制无疑会给您带来比您要求的少的信息.在响应API查询时,所有Facebook似乎都遵循足够好"的原则.如果您要索要5000件物品,并且5-15秒后系统只能取回350件物品,那很可能就是您要取回的物品.内容的大小似乎也有限制.因此,限制完全取决于您要查询的内容的类型,而不是固定的数量.可能会说limit=5且仅获得4个项目(即使存在更多).

If you set a limit, you won't get any more than that. However, a large limit will most certainly give you less than you requested despite more existing. All of Facebook seems to run on a principle of "good enough" when it comes to responding to API queries. If you ask for 5000 items and after 5-15 seconds the system is only able to retrieve 350, then that's likely all you'll retrieve. There also seems to be a limit on size of content. So, the limit completely relies on the type of content you're querying and it's not a fixed amount. It's possible to say limit=5 and only get 4 items (even when more exist).

limit=0过去常常给出尽可能多的响应,但是我不确定它是否仍然有效.您也可以使用since/until来更详细地说明要检索的项目.但是无论如何,都无法知道您是否已获得所有可能的回复.

limit=0 used to give as many responses as possible, but I'm not sure if it still works. You can also use since/until to be more specific about the items you want to retrieve. But regardless, there's no way to know if you've gotten all possible responses.

这篇关于如何检索标记了一个人的所有Facebook照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆