• <i id='V5uXh'><tr id='V5uXh'><dt id='V5uXh'><q id='V5uXh'><span id='V5uXh'><b id='V5uXh'><form id='V5uXh'><ins id='V5uXh'></ins><ul id='V5uXh'></ul><sub id='V5uXh'></sub></form><legend id='V5uXh'></legend><bdo id='V5uXh'><pre id='V5uXh'><center id='V5uXh'></center></pre></bdo></b><th id='V5uXh'></th></span></q></dt></tr></i><div id='V5uXh'><tfoot id='V5uXh'></tfoot><dl id='V5uXh'><fieldset id='V5uXh'></fieldset></dl></div>

    1. <tfoot id='V5uXh'></tfoot>

        <bdo id='V5uXh'></bdo><ul id='V5uXh'></ul>
    2. <legend id='V5uXh'><style id='V5uXh'><dir id='V5uXh'><q id='V5uXh'></q></dir></style></legend>

      <small id='V5uXh'></small><noframes id='V5uXh'>

      1. 给特定 wordpress 用户的 FCM 通知

        FCM Notification to specific wordpress user(给特定 wordpress 用户的 FCM 通知)
      2. <i id='VsbCb'><tr id='VsbCb'><dt id='VsbCb'><q id='VsbCb'><span id='VsbCb'><b id='VsbCb'><form id='VsbCb'><ins id='VsbCb'></ins><ul id='VsbCb'></ul><sub id='VsbCb'></sub></form><legend id='VsbCb'></legend><bdo id='VsbCb'><pre id='VsbCb'><center id='VsbCb'></center></pre></bdo></b><th id='VsbCb'></th></span></q></dt></tr></i><div id='VsbCb'><tfoot id='VsbCb'></tfoot><dl id='VsbCb'><fieldset id='VsbCb'></fieldset></dl></div>
          <tbody id='VsbCb'></tbody>
        <legend id='VsbCb'><style id='VsbCb'><dir id='VsbCb'><q id='VsbCb'></q></dir></style></legend>

        • <bdo id='VsbCb'></bdo><ul id='VsbCb'></ul>

            <tfoot id='VsbCb'></tfoot>

          1. <small id='VsbCb'></small><noframes id='VsbCb'>

                • 本文介绍了给特定 wordpress 用户的 FCM 通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个基于 wordpress 博客的 android 应用程序,用户可以在其中发布自己的文章,我使用 WP REST API 来获取帖子、评论和用户......

                  i am developping an android application based on a wordpress blog where users can post their own articles, i work with WP REST API to get posts , comments and users ...

                  我想在他的文章有新评论时自动向用户发送通知,我已经正确安装了 FCM 并测试了简单的通知形式,但我需要:

                  I would like to send a notification automatically to the user when his article got a new comment , i have installed FCM correctly and tested the simple forme of notifications but i need to :

                  • 发送新评论时触发 FCM 通知(或只需单击按钮)
                  • 指定接收者,以便使用正确的电子邮件/用户名将通知发送给登录用户

                  我想到了

                  • 为每个这样记录的用户设置用户属性:

                  mFirebaseAnalytics.setUserProperty("user_name_for_notification", "the_username");

                  • 为所有设备发送通知,然后在 onMessageReceived
                  • 中处理它

                  但我不认为这些是好主意

                  but i don't think those are good ideas

                  所以,任何想法从哪里开始

                  So , any ideas where to start

                  谢谢

                  推荐答案

                  FCM 可以通过三种不同的定位方法发送通知:

                  FCM can send notifications with three different targeting methods:

                  1. 到特定的 FCM 令牌/实例 ID 令牌,用于标识特定设备上特定应用程序的安装.
                  2. 到一组此类设备/实例 ID.
                  3. 到 FCM 客户可以订阅的特定主题.

                  Firebase Cloud Messaging 没有用户的概念,因此不能直接针对用户.如果您想定位用户,您必须将他们映射到上面列出的定位方法之一.

                  Firebase Cloud Messaging does not have the concept of a user, therefor it cannot target users directly. If you want to target users, you will have to map them to one of the targeting methods outline above.

                  我所知道的最常见的方式:

                  The most common ways that I know of:

                  1. 将用户的令牌存储在其 UID 下的数据库中,然后在需要定位用户时发送到用户的令牌.
                  2. 根据用户的 UID 为每个用户提供自己的主题.让应用订阅该主题,并在您需要定位用户时向用户的主题发送消息.

                  另见:

                  • 如何使用 Firebase 消息传递一对一消息
                  • 使用 firebase 向自定义用户发送消息
                  • 按用户向用户发送 Firebase 云消息传递通知属性
                  • 如何向用户发送数据消息来自 Rest API 的分段

                  这篇关于给特定 wordpress 用户的 FCM 通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How can I use CClistview in COCOS2d Android?(如何在 COCOS2d Android 中使用 CClistview?)
                  cocos2d-android: how to display score(cocos2d-android:如何显示分数)
                  Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)
                  SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)
                  Android file copy(安卓文件拷贝)
                  Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)

                  <small id='P4wia'></small><noframes id='P4wia'>

                  <tfoot id='P4wia'></tfoot>
                    <i id='P4wia'><tr id='P4wia'><dt id='P4wia'><q id='P4wia'><span id='P4wia'><b id='P4wia'><form id='P4wia'><ins id='P4wia'></ins><ul id='P4wia'></ul><sub id='P4wia'></sub></form><legend id='P4wia'></legend><bdo id='P4wia'><pre id='P4wia'><center id='P4wia'></center></pre></bdo></b><th id='P4wia'></th></span></q></dt></tr></i><div id='P4wia'><tfoot id='P4wia'></tfoot><dl id='P4wia'><fieldset id='P4wia'></fieldset></dl></div>
                      <legend id='P4wia'><style id='P4wia'><dir id='P4wia'><q id='P4wia'></q></dir></style></legend>
                          <tbody id='P4wia'></tbody>

                            <bdo id='P4wia'></bdo><ul id='P4wia'></ul>