PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 11, 2022

[FIXED] Find friends active (logged in) on Facebook app right now

 February 11, 2022     facebook, facebook-fql, facebook-graph-api, facebook-php-sdk, php     No comments   

Issue

I know /me/friends will give list of friends who use a particular fb app

This is what I want to do:

if A, B, C are 3 facebook friends using an fb app, all three logged into the app currently, then all the 3 will be visible to each other

If A logged out of the fb app only B and C will be visible to each other

Basically I want to show list of friends currently (real-time) using my facebook app...

Please let me know if it possible and how

Thanks in advance


Solution

As the others have said, just log in your own database when a user logs into your application. Store the Facebook ID and the timestamp of their login and then you can update that timestamp any time a user completes an action or you run a script. This way the timestamp in your database remains up to date.

You can then compare this with the user's friend's timestamps. It wouldn't be exactly real time (though it would be very close), but then only show the users as online if they have been active within a certain window of time (like 30 seconds, 1 minute, 5 minutes, etc).



Answered By - Phillip
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing