Facebook的图形API,如何让Facebook的在线好友列表? [英] Facebook Graph API, how to get facebook online friends list?

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

问题描述

可能重复:结果
   Facebook上的网友

我使用Facebook的图形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?

现在我能够获得哈希本书实例的用户列表,在返回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.

修改:现在,我使用这个查询获取好友列表查询=选择名称,CURRENT_LOCATION,UID,pic_square从用户其中uid中(从朋友选择UID2其中,UID1 =我())按名称命令; ,但我想唯一的在线好友列表

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.

感谢您的帮助!

推荐答案

这可能会帮助您 http://stackoverflow.com/a /一百四十五万八千零四十七分之五百六十六万九千四百四十一。当你获得这些权利,你应该能够在FQL访问状态。

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

随着这它需要一个FQL查询--- SELECT名,UID FROM用户WHERE
  online_ presence IN('主动','空闲')
  和UID IN(
    选择从UID2 WHERE朋友UID1 =我())

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的图形API,如何让Facebook的在线好友列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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