Web应用程序的邀请系统(推送)

I am creating an web app and a user can start a game with multiple players (your friends). This game is played on 1 device. Is it possible that all invited players get a notification on their device where they can accept or decline the invitation ?

So in steps

  • Player 1 creates a game and invites player 2 and 3
  • Player 2 receives a notification on his mobile device and presses accept, he is added as player of that game
  • Player 3 doesn't have a device and enters his PIN to accept his participation.

The step that I want to have is step2. I have read about OneSignal who can send push notifications to specific users, but I could not find if you can send a response back (accept or decline). Or is there an other way (without to have a native app).

your question is understood but at this moment a little too broad. But. I will try to answer in concept also :)

Now...you said you already know how to send target specific notification with OneSignal.

What you need to do from now one it cloud be like this:

  • Attach a link or click or action to that invite. Or when such invite arrived open a particular view in the app/web/application that you are developing and revives the link.
  • Attach the session/game/user/object ID to that link and send the call to you API (which is based on your server). If you have an API, if you don't you can have a very simple API build to handle only such requests with URL xxxx.com/path/to/api/call/var1/var2/var3/etc
  • From there you can catch the request and reply or adapt accordingly on your server side.

Maybe this Framework can help you to speed up the API dev in PHP. Lumen can do that trick.

You can follow this tutorial here for a fast API development with it.