可扩展的 FQL:有多少个喜欢 Facebook 页面的 Facebook 好友?
我需要准确统计喜欢 Facebook 页面的朋友(即页面粉丝的朋友)。
我担心以下 FQL 无法扩展到拥有 500 多个好友的用户和拥有 5000 多个赞的页面等...
SELECT uid FROM page_fan WHERE page_id='PAGE_ID' AND uid IN (
SELECT uid2 FROM friend WHERE uid1 = me()
)
Facebook 是否限制 FQL 查询返回的结果数量,或对 IN 子查询?
据我所知,FQL 不支持 COUNT
,因此我需要获取结果并在服务器/客户端对它们进行计数。
FQL 取自:http: //www.leftjoin.net/2011/03/getting-list-of-user-friends-who-like-some-page/
我的演示:http://www.fbrell.com/saved/8a6e57dbdff4587a563cbb6553ddfb3c?autoRun=false
..单击“运行代码”,然后按照步骤操作。 ...
I need an accurate COUNT of FRIENDS that LIKE a Facebook Page (i.e. Friends that are Page Fans).
I'm concerned the following FQL wont scale e.g to a User with 500+ Friends, and Page with 5000+ Likes...
SELECT uid FROM page_fan WHERE page_id='PAGE_ID' AND uid IN (
SELECT uid2 FROM friend WHERE uid1 = me()
)
Does Facebook limit the number of results returned on FQL queries, or place any limitations on IN
sub-queries?
To my knowledge, FQL does not support COUNT
, so I will need to take the results and count them server/client side.
FQL taken from: http://www.leftjoin.net/2011/03/getting-list-of-user-friends-who-like-some-page/
MY DEMO: http://www.fbrell.com/saved/8a6e57dbdff4587a563cbb6553ddfb3c?autoRun=false
... Click on "Run Code", then follow the steps ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
老问题,但发现它在研究 FQL。
FQL 中返回结果的限制为 4999,因此假设您有 > 4999 个朋友也喜欢该页面,您将无法获得所有结果。限制(和过滤)是在向您发送回复之前完成的,并且不应影响子查询。
Old question, but found it researching FQL.
The limit on results returned is 4999 in FQL, so given you have > 4999 friends that also likes the page you would not get all the results. The limitation (and filtering) is done just before sending the reply to you and should not effect sub-queries.