如何处理 Facebook Graph 的大量查询?
我想了解每个朋友的每一个状态更新。假设我有 500 个朋友,每个朋友有 200 个状态,那么这可能是 100,000 个状态。从查询的角度来看,您将如何处理这个问题?
你会写什么查询? Facebook 会允许一次性传输这么多数据吗?如果没有,是否有最佳实践分页或偏移解决方案?
I'd like to get every status update for every friend. Given I have say 500 friends, each with 200 statuses, this could be 100,000 statuses. How would you approach this from the query point of view?
What query would you write? Would Facebook allow this much data to come through in a single go? If not is there a best practice paging or offsetting solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不会。Facebook 会抛出数据过多异常。此外,还有一个自动化系统,它会阻止耗时的请求,并且如果您的应用程序在单个表上过于频繁地进行过多查询,它也会阻止您的应用程序 - API 限制警告。
您可以在 FQL 中以及在图形中查询连接时进行分页。这是最佳实践。
No. Facebook will throw exception of too much data. Also there is automated system in place which will block time-consuming requests as well as it will block your app if it is making too much queries too frequently on a single table - API Throttling Warnings.
You can do paging in FQL and when querying connections in graph. It is best practice.
从他们的政策来看:
http://developers.facebook.com/policy/
这意味着 100k 并不是什么大不了的事。不过,这取决于情况。您可能必须考虑,
From their policy:
http://developers.facebook.com/policy/
It means that 100k is not so big deal. However, it depends. You may have to consider,