Facebook FQL查询,让所有用户在线 [英] Facebook FQL query to get all users online

查看:120
本文介绍了Facebook FQL查询,让所有用户在线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我保存我的应用程序的所有用户在本地的MySQL数据库中的记录。我有所有相关信息,以获得用户在线状态[ UID,access_token 并授予扩展许可]。



如何获取所有用户的在线状态?



我目前使用的是单独查询每个用户:

  $ facebook-> api(array 

'access_token'=>'x',
'method'=>'fql.query',
'query'=>SELECT uid,name,first_name,last_name ,online_presence FROM user WHERE uid = x
));

但这是150位用户的时间步骤。我甚至不说400+或1000+。



p.s。因为要求用户存在需要提供 access_token

解决方案

我的解决方案:

  SELECT name,uid,online_presence FROM user WHERE uid = me()


I keep record of all users of my app in local, MySQL database. I have all the relevant information required to get user online presence status [UID, access_token and granted extended permission].

How do I get online presence status of all users?

The approach I am using at the moment, is to query each user separately:

$facebook->api(array
(
    'access_token'  => 'x',
    'method'        => 'fql.query',
    'query'     => "SELECT uid, name, first_name, last_name, online_presence FROM user WHERE uid = x"
));

But this is time taking procedure with 150 users. I am not even talking about 400+ or 1000+.

p.s. multiquery didn't work for me, because asking user presence requires to provide the access_token.

解决方案

My solution:

SELECT name, uid, online_presence FROM user WHERE uid=me()

这篇关于Facebook FQL查询,让所有用户在线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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