Facebook online friend

谁说胖子不能爱 提交于 2019-12-17 18:48:14

问题


ive tryed some solution found here to get a list of my friend online:

Facebook FQL query to get all users online

How to get list of online friends using FQL with facebook API?

this is my fql query:

$fql = "SELECT uid, name, online_presence, status FROM user WHERE uid IN 
( SELECT uid2 FROM friend WHERE uid1 = '".$me['id']."')";

But the presence field is empty for 99% of my friends. I get the presence (active, idle, offline), only for 6/7 friends. the same for the status field.

How i can get the complete presence and status data? What i'm missing? I need to request a particular permission for my app (currently i have only the basic).

Thank you very much.

EDIT: The @Roozbeh15 solution is the answer, but i need to fid why the result isn't the same number of user i hvae in chat. The fql user count is always < than the user in fb chat. Do you know why?


回答1:


You need the user_status permission to read the user's status and user_online_presence and/or friends_online_presence permissions for the online_presence.

Here is the full permissions list.



来源:https://stackoverflow.com/questions/5666153/facebook-online-friend

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!