FCM 在哪里保存博览会代币?
仍然没有实现将世博令牌保存在数据库中的方法,但从 FCM 控制台可以向所有下载了我的应用程序的设备发送通知。 FCM 是否会以任何方式保留代币?如果确实如此,它会将它们存储在哪里?无法找到他们
Still haven't implemented a way for expo tokens to be saved on a database, but from FCM console can send notifications to all devices that have downloaded my app. Does FCM keep the tokens either way? And if it does where does it store them? Unable to find them
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,当我们通过控制台发送通知时,我们无法检索 FCM 在后端使用的令牌或数据。
在一个裸露的React Native项目中,方法是将令牌保存在数据库中(例如:Firestore)。因此,当您需要发送通知时,您可以获取相应的令牌来使用它。希望世博会也如此。
总而言之,您必须将令牌存储在某个地方(并在令牌发生变化时更新它)才能实现您的目标。
AFAIK we can't retrieve the tokens or the data that FCM uses in its backend when we send a notification through the console.
In a bare React Native project, the way is to save the token in a database (eg : Firestore). So when you need to send a notification you can grab the respective token to use it. Hope this is same for expo also.
To summarise you'll have to store the token somewhere(also update it whenever it changes) to achieve your goal.