简体   繁体   English

如何基于用户属性用户发送Firebase云消息传递通知?

[英]How to send firebase cloud messaging notification based on user property user?

Like it's said here I know it's not possible to send notification by user property with the HTTP v1 API. 就像这里所说的我知道不可能使用HTTP v1 API通过用户属性发送通知。

But is it possible to use an alternative way to do this? 但是是否可以使用其他方式来做到这一点? Like, call a cloud function from my backend that takes the message and the user property in parameter and send the notification. 就像,从我的后端调用一个cloud函数,该函数将消息和user属性作为参数并发送通知。

Have a look at the official Firebase sample which "demonstrates how to send a Firebase Cloud Messaging (FCM) notification from a Realtime Database triggered Function". 看一下Firebase的官方示例,该示例“演示如何从实时数据库触发的功能发送Firebase云消息(FCM)通知”。

Users sign into the app and are requested to enable notifications on their browsers. 用户登录该应用程序,并被要求在其浏览器上启用通知。 If they successfully enable notifications the device token is saved into the Realtime Database. 如果他们成功启用了通知,则设备令牌将保存到实时数据库中。

..... .....

The sample also features a Web UI to experience the FCM notification. 该示例还具有一个Web UI,以体验FCM通知。

All the code and instructions are here: https://github.com/firebase/functions-samples/tree/Node-8/fcm-notifications 所有代码和说明都在这里: https : //github.com/firebase/functions-samples/tree/Node-8/fcm-notifications

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何根据用户属性,用户受众群体发送Firebase Cloud Messaging通知 - How to send Firebase Cloud Messaging notification based on user property, user audiences 按用户属性向用户发送Firebase云消息通知 - Send Firebase Cloud Messaging notification to users by user property Firebase 云消息用户向另一个用户发送通知 - Firebase Cloud Messaging user sending notification to another user 如何从 javascript 发送 firebase 云消息通知? - How can I send a firebase cloud messaging notification from javascript? 如何通过firebase云消息发送定时通知到flutter app - how to send scheduled notification to flutter app through firebase cloud messaging 如何使用ä,ö,ü等特殊字符发送Firebase云消息通知? - How to send a Firebase Cloud Messaging Notification with special characters like ä, ö, ü? 使用Swift中的Firebase Cloud Messaging将通知作为消息发送 - Send Notification as message with Firebase Cloud Messaging in Swift Firebase Cloud Messaging为一组用户发送通知 - Firebase Cloud Messaging to send notification for set of users 如何在Firebase云消息传递中向多个浏览器/设备上的同一用户发送通知? - How to send notifications to same user on multiple browsers/devices in firebase cloud messaging? Firebase Cloud Functions - 当用户再次在线时发送通知? - Firebase Cloud Functions - Send Notification user when they are online again?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM