从服务器发送通知给安装应用程序的用户段 [英] Send notification from the server to user segment who installed the app

查看:84
本文介绍了从服务器发送通知给安装应用程序的用户段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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(我认为这是你的用例最可取的)。



下面是如何发送这个使用邮递员 cURL


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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆