火力基地一信号推送通知指南 [英] Firebase & One Signal Push Notifications Guidance

查看:86
本文介绍了火力基地一信号推送通知指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在玩One Signal& Firebase推送通知.

I have been playing around with One Signal & Firebase Push Notification.

我几乎可以确定One Signal不能帮助我,并且开始觉得Firebase也可能无法帮助我.

I am almost sure One Signal cannot help me and am starting to feel Firebase might also not be able to help me.

我们有一个Web应用程序,允许普通作者发布文章.它还允许用户使用Firebase同步的实时数据库对文章发表评论.

We have a web app that allows regular authors to post articles. It also allows users to comment on the article using Firebase synced realtime database.

我想创建一些功能,用户可以在其中获得针对特定文章注释的推送通知.房间ID将是商品ID.如果两者都通常都允许从我们的应用程序发出推送通知并评论了某篇文章,那么他们将仅订阅该文章的评论.他们还可以单击此特定文章评论主题上的按钮,并根据需要取消订阅该文章评论主题.

I want to create functionality where users can get a push notification for article-specific comment treads. The room ID will be the article ID. If both allow push notification generally from our app and has commented on an article, they subscribe to this article comment tread solely. They can also click a button at this specific article comment thread and unsubscribe to this article comment thread if they want.

因此,我们可能会轻描淡写地在每篇文章中包含数千篇文章和数百条评论.

So we may have thousands of articles and hundreds of comments in each article, to put it lightly.

当我不觉得每篇文章都可以有一个单独的段"时,我很快就离开了One Signal,我不确定这是不允许的吗?有想法吗?

I quickly moved away from One Signal when I didn't feel like I could have a separate "Segment" for each article, I wasn't certain this is allowed? Thoughts there?

在探索Firebase的整个过程中,我只是在他们的文档中发现了与群体有关的评论(我希望是我的文章室).

Throughout my exploration of Firebase I just came across this comment in their documentation in relation to groups (Which I was hoping could be my article room).

"此处.根据我的理解,键是组键.这将不起作用,因为如果评论线程中有20个以上的用户,该怎么办.我查找了有史以来最受欢迎的评论线程,找到了500之类的数字.这意味着我的系统必须能够为每篇文章支持大量用户.

"The maximum number of members allowed for a notification key is 20" found here. A key is a group key from my understanding. This won't work because what if there are more than 20 users in a comment thread. I looked up the most popular commented threads ever to find numbers like 500. This means my system would have to be able to support large numbers of users per article tread.

另外,似乎可以调查一个信号标记和社交活动,但是我的一般性问题并不具体,它是一个更广泛的一般性问题.我希望有经验的人可以就解决此问题的最佳方法提供一些指导和好的提示.我想知道的是,甚至允许如此规模的推送通知吗?

Additionally One Signal Tags and Social activities look like could be investigated, but my general question is not specific, its more a wider general question. I am hoping someone with experience can give some guidance and good tips on best way to approach this problem. Are Push notification even allowed on such a scale I am wondering?

缩放示例 1000条文章,每条文章都有100位不同的用户评论.用户只能收到有关他仅发表过评论的文章的推送通知. (假设他首先允许整个网站的推送通知,并且没有阻止我们或完全取消订阅该网站.订阅该网站不会自动为您订阅任何特定内容,只是意味着您愿意订阅某些内容并可以控制哪些内容轻松地

A scaling examples 1000 Articles with 100s of different users commenting on each article. A user may only receive a push notification on articles which he has commented in only. (Assuming he has allowed push notification site-wide first and not blocked us or unsubscribed from the site entirely. Subscribing to the site doesn't automatically subscribe you to anything specific, just means you willing to be subscribed to something and have control which things easily)

感谢您的阅读,并希望能听到有此经验的人的想法,并分享他们的经验.

Ok thanks for reading and looking forward to hearing from someone with this experience and share their experience.

Daniel Gadd @ GaddBox

Daniel Gadd @ GaddBox

推荐答案

也许有点晚了.

您必须使用 topics .

FCM主题消息传递使您可以将消息发送到已选择加入特定主题的多个设备.您可以根据需要编写主题消息,然后FCM处理路由并将消息可靠地传递到正确的设备.

FCM topic messaging allows you to send a message to multiple devices that have opted in to a particular topic. You compose topic messages as needed, and FCM handles routing and delivering the message reliably to the right devices.

在您的情况下,每篇文章都是一个主题.

In your case, every Article is a topic.

这篇关于火力基地一信号推送通知指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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