4

I'm trying to build some kind of a social game in facebook, where I need that every user that has approved my APP is able to receive notifications from me.

When the user approves my App, I save his UID in the DB for future reference.

At some later time, I want to make it possible for other users find partners for a game - so I need a way to pick randomly some user from my DB and check if he's online. Then, send him a message and propose to play with the current player.

So 2 questions:

  1. How can I check if some user is online, using Javascript SDK? It seems that in the new Graph API I can't get the users' online status.
  2. How can I then send him a message and propose to play the game? When he approves to play - he is being forwarded to the game page.

Many thanks in advance,

Roman

Roman
  • 171
  • 11

1 Answers1

3

To get the user status you can try FQL, check this answer: How to get list of online friends using FQL with facebook API?

About your second question, check this: how send message facebook friend through graph api using Accessstoken

Community
  • 1
  • 1
Gui
  • 9,555
  • 10
  • 42
  • 54