Facebook Graph API,如何获取facebook在线朋友列表? [英] Facebook Graph API, how to get facebook online friends list?

查看:282
本文介绍了Facebook Graph API,如何获取facebook在线朋友列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

Facebook在线朋友

我正在使用Facebook Graph API,我想知道如果还有一个电话可以得到所有用户的列表和当前的在线状态(即在线或离线)?

I am using the Facebook Graph API and I was wondering if there was anyway to get a list of all the users and their current online-status (i.e Online or Offline) in one call?

现在我可以得到来自Hash book的用户列表示例,返回JSONArray没有与此在线状态相关的任何对象。

Now i'm able to get list of users from Hash book Example, in that return JSONArray don't have any object related to this online-status.

编辑:现在我正在使用此查询获取朋友列表 query =select name,current_location,uid,pic_square from user where uid in(select uid2 from friend where uid1 = me())order by name; 但我只想在线的朋友列表。

EDIT: now i'm using this query for getting friends list query = "select name, current_location, uid, pic_square from user where uid in (select uid2 from friend where uid1=me()) order by name"; but i want only online friends list.

感谢任何帮助!

推荐答案

这可能有助于您 https://stackoverflow.com/a/5669441/1458047 。当您获得这些权限时,您应该可以通过fql。

This might help you https://stackoverflow.com/a/5669441/1458047. When you gain these rights, you should be able to access the status over fql.

访问状态,这需要一个FQL查询--- SELECT name,uid FROM user WHERE
online_presence IN('active','idle')
AND uid IN(
SELECT uid2 FROM friend WHERE uid1 = me())

along with this it requires a FQL query--- SELECT name,uid FROM user WHERE online_presence IN ('active', 'idle') AND uid IN ( SELECT uid2 FROM friend WHERE uid1 = me())

这篇关于Facebook Graph API,如何获取facebook在线朋友列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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