How to detect when friends are online?
-
27-10-2019 - |
Pergunta
I want to create a desktop application that notifies me whenever a specific friend comes online. My idea was to use the chat API, but found out that it doesn't support "presence probes," which I suppose are what I need. Any other to do so?
Solução
Your best bet is to use the online_presence
field of the FQL user table.
online_presence
: The user's Facebook Chat status. Returns a string, one of active, idle, offline, or error (when Facebook can't determine presence information on the server side). The query does not return the user's Facebook Chat status when that information is restricted for privacy reasons.
To access this information you will need user to grant friends_online_presence
permission to your application.