建立朋友的社交图 [英] Build social graph of friends

查看:100
本文介绍了建立朋友的社交图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的应用程序中为每个用户建立一个朋友的社交图。
喜欢做Facebook应用程序社交图:
应用程序URL
正如我所看到的,除了他们也在使用应用程序之外,没有办法提取朋友的朋友。所以我正在想的是提取朋友和每一对朋友,我可以和朋友一起检查。他们是否是朋友,因此建立社交图表。
但是对于有300个朋友的用户,我需要45.150个API调用。哪个超过每小时的API通话限制。
那么有没有办法在API请求中投入更多的查询。或者任何建议如何以更好的方式构建这个社交图?

I need in my application to build a social graph of friends for each user. Like it is doing the facebook app "Social Graph": App URL. As I have seen there is no way to extract the friends of friends besides they are also using the application. So what I was thinking about is to extract the friends and for each pair of friends I can check with friends.areFriends whether they are friends and so build the social graph. But for a user with 300 friends, I need 45.150 API calls. Which exceeds the API call limit per hour. So is there a way to cast more queries in an API request. Or any suggestions how I can build this social graph in a better way??

最好的问候

推荐答案

我建议稍微不同的做法。您应该储存您在数据存储中可以更快的查询。您应该从Facebook实施实时API,并订阅每个用户的朋友请求。通过这种方式,您可以跟踪友情链接,以开始整理社交图。

I would suggest a slightly different approach to doing this. You should store what you can in your data store for quicker querying. You should implement the Real-Time API from Facebook and subscribe to each user's friend requests. This way you can keep track of friendship links to start fleshing out your social graph.

这篇关于建立朋友的社交图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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