# Play with a friend

**URL:** <https://forum.heroiclabs.com/t/play-with-a-friend/726>\
**Category:** Game Design\
**Created:** [May 12, 2020, 2:42pm UTC](https://forum.heroiclabs.com/t/play-with-a-friend/726 "2020-05-12T14:42:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GUIZARD](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/guizard/32/249_2.png) [@GUIZARD](https://forum.heroiclabs.com/u/GUIZARD)\
**Post date:** [May 12, 2020, 2:42pm UTC](https://forum.heroiclabs.com/t/play-with-a-friend/726/1 "2020-05-12T14:42:46Z")

</div>

Hi there ! My company is developing a PvP trivia game with Unity and we choose Nakama as backend engine because it has everything we need and even more 🙂 .  
Besides the random matchmaking we also need to implement a “play with friends” mode, where a user can send an invite to a facebook’s friend to join a match. Looking at the doc seems that Nakama doesn’t have such functionality out of the box, am I right ?

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [May 13, 2020, 9:44am UTC](https://forum.heroiclabs.com/t/play-with-a-friend/726/2 "2020-05-13T09:44:02Z")

</div>

Welcome @GUIZARD 👋

> Looking at the doc seems that Nakama doesn’t have such functionality out of the box, am I right ?

I think the best answer is yes and no. 🙂 I’ll add more details on various parts I know that make up that gameplay feature:

- Send a push notification if the player is offline. This would be done via an RPC function with Nakama that would call out to a push notification service like Leanplum, etc. The push token for each player should be stored in a storage object private to the player.
- Send the invite when the player is online. You can be notified when the player comes online with the [status](https://heroiclabs.com/docs/social-status/) feature in Nakama. Use a non-persistent [in-app notification](https://heroiclabs.com/docs/social-in-app-notifications/) to ping the invite to the player.
- Send a game invite which could lead to an app install via Facebook. I believe the guys at Branchio had a way to provide this feature but I don’t know if they’re around anymore. Also I’ve never used their API on a project yet so I don’t know how nice it is.

Hope this helps.
