fetch facebook friends that are currently online

0 votes
I want to fetch facebook friend list that are currently online in my game. how could I achieve that?
asked Jul 23, 2014 in AppWarpS2 by patel.sagar2611 (34 points)

2 Answers

0 votes

Hey,

In AppWarp Client SDK, there is an API named GetOnlineUsers() which returns the list of all the online players in the onGetOnlineUsers callback of the registered ZoneRequestListener objects.

Thereafter you can get list of all the friends throght the Facbook SDK and compare who are online.

answered Jul 23, 2014 by Suyash Mohan (900 points)
0 votes
Answer by Suyash Mohan is correct but there is also another way of achieving this scenario in AppWarp S2. You can use Facebook server side SDK to fetch the users friends (given its auth token) and make a graph API call to Facebook for fetching the friends. Then simply compare that on the server side only with the online users.

The advantage of this is that it will be faster as compared to doing the entire procedure on the client side. We also have a sample for this in AppWarp S2. Take a look at the quizup trivia game sample. It does this on the server side after getting the auth token from the client.

http://appwarps2.shephertz.com/dev-center/quizup-trivia-game/
answered Jul 23, 2014 by dhruvc (1,099 points)
ok thanks. will try that out.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...