Hello
,
I’m developing an app a bit like Facebook and I need some help setting up Trigger Notifications.
Here’s what I want:
1. When X posts something, Y (their subscribers / friends / followers) should receive a notification.
2. When X comments on Y’s post, Y should receive a notification.
3. When X replies to Y’s comment, Y should receive a notification.
In short, I want notifications to work like on Facebook: the content owner is notified as soon as someone interacts with their post (post, comment, reply).
I’ve already managed to create the collections (Posts, Comments, Users).
I set up a “Trigger Notification” after a comment is created, but I’m having trouble correctly linking the Recipient for each case.
Could someone explain (or show an example) of:
How to correctly choose the Recipient?
How to structure the relationships between Posts, Comments, and Users so that notifications are automatically sent to the right people?
Thank you so much 
Hello @Wiseman, regarding setting up the trigger notification’s recipient, you can check the following examples to afd them in your app:
1- For likes - Recipient would be (Current Post → Creator)
2- For comments - Recipient would be (Current post → Creator)
3- For replies, you’ll have 2 trigger notifications:
- First trigger notification with the Recipient to be the (Current Comment → Creator).
- Second trigger notification (optional) - Recipient would be (Current post → Creator)
4- When a new post is created - Recipients are (Logged in user → Followers / Friends).
Please let me know if you’d like more explanation.
Thank you!
Thank you, what about titles, body and screen
You’re welcome! Regarding the title and body, you can customize them, and here’s an example:
- Title: New Like!
- Body: Alex liked your post.
Regarding the screen section, it’s choosing the screen that will open to the user after clicking on the notifications. You can either connect it to the home screen, or create a screen and call it (Notifications), and connect it to it.
Thank you!