I have got my friends list after getting logging in on facebook using Facebook connect Java script client API. I want list of my friends that are online at given time.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
online_presencecolumn of theusertable, which gives the user’s current Facebook Chat status. This isn’t a foolproof “is this user online right now” but it does serve the general purpose as such. This column is a string which has one of four possible values:active,idle,offline, orerror. Querying thefriendtable in conjunction with this can yield the result you requested (in this case I consider “online” to meanactiveoridle):UPDATE:
Note that you need the
user_statuspermission to read the user’s status anduser_online_presenceand/orfriends_online_presencepermissions for theonline_presence.Thanks to https://stackoverflow.com/users/613631/laphroaig for bringing this up (Facebook online friend), and to https://stackoverflow.com/users/570958/roozbeh15 for his answer.