FCM通知发送旧消息

时间:2020-10-28 15:31:51

标签: react-native push-notification firebase-cloud-messaging expo react-native-fcm

我正在用Expo开发一个本机应用程序。我想通过Firebase Cloud Messages向设备发送推送通知。 当我从NodeJs推送通知时,设备始终会收到在新消息之前发送的消息。你有什么建议吗?

这是我的发件人:

const fetch = require('node-fetch');

fetch('https://fcm.googleapis.com/fcm/send', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: `key=xxx`,
    },
    body: JSON.stringify({
      to: token,
      priority: 'high',
      data: {
        experienceId: '@username/project',
        message: 'test',
      },
    }),
  })

感谢您的支持

0 个答案:

没有答案
相关问题