从服务器发送通知给安装应用程序的用户段 [英] Send notification from the server to user segment who installed the app
问题描述
在Firebase控制台中,我看到可以选择通过应用com.example(其中com.example是应用名称)向User Segement发送通知。
如图所示:
< img src =https://i.stack.imgur.com/cke4t.pngalt =在这里输入图片描述>
但是如何使用FCM REST API从服务器端执行:
https://fcm.googleapis.com/fcm/send
不幸的是, 无法使用FCM REST API将消息发送到用户细分。
作为一种选择,你将不得不利用其他方式来发送消息给多像简单地使用
registration_ids
参数和Topics Messaging(我认为这是你的用例最可取的)。 In Firebase console, I saw the option to send a notification to User Segement with app "com.example" (where com.example is the app name).
As the image shows:
But how to do it from the server side using the FCM REST API:
https://fcm.googleapis.com/fcm/send
Unfortunately, it is not possible to send messages to User Segments using the FCM REST API.
As an alternative, you'll have to make use of the other ways to send messages to multiple devices, like simply using the registration_ids
parameter and Topics Messaging (which I think is the most preferable for your use-case).
Here are samples on how to send this using Postman or cURL.
这篇关于从服务器发送通知给安装应用程序的用户段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!