我在index.js中创建了一个函数,每当用户有新的活动提要项时,它都会向用户发送通知,比如当有人喜欢帖子、留言或发送消息时。当我运行它时,我在firebase上的函数日志中得到了这个错误: TypeError: admin.messaging.send is not a function
at sendNotification_tickCallback (internal/process/next_tick.js:68:7) 我已经尝试过npm install firebase</em
目前,Firebase提供的开源云函数使用onwrite to Firebase数据库来触发对Stripe的计费:
看起来使用https触发器来调用Stripe会更直接、更快,而不是写到Firebase本地数据库,后者会同步/写入到Firebase服务器数据库,然后触发对Stripe的云函数调用。使用onwrite触发器而不是https有什么好处?