最好的算法,以确定哪些朋友也在使用Facebook和应用程序引擎的应用程序? [英] best algorithm to determine which friends are also using an application on Facebook and appengine?

查看:119
本文介绍了最好的算法,以确定哪些朋友也在使用Facebook和应用程序引擎的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个Facebook应用程序(在应用程序引擎工作),我需要告诉它他的朋友已经在使用应用程序的用户。

On a Facebook application (working under appengine) I need to tell the user which of his friends are already using the application.

当用户使用Facebook应用程序,脸谱处理用户的好友列表来应用。这份名单可能有多达5000个好友,所以检查逐一可能太慢。

When a user uses a Facebook application, Facebook handles the user's friend list to the application. This list might have up to 5000 friends, so checking them one by one might be too slow.

什么是做到这一点的好友列表和其他列表之间的交叉点的最好办法,例如,所有用户的列表中选择此应用程序已经有?

What's the best way to do an intersection between this friends list and other list, for example, the list of all the users this application already has?

谢谢

推荐答案

您不必来处理自己。有一个API调用它: Friends.getAppUsers

You don't have to handle that yourself. There's an API call for it: Friends.getAppUsers

大多数API库应该支持它,它一定会成为成本比试图手工管理问题下。此外,Facebook将要你用cacheing它的最新的信息,而不是。

Most API libraries should support it and it'll definitely be lower cost than trying to manage the problem by hand. Also, Facebook will want you to use the very latest information instead of cacheing it.

这篇关于最好的算法,以确定哪些朋友也在使用Facebook和应用程序引擎的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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