Reputation: 53
I can't use notification from function request of firebase, what's wrong? Error: could not handle the request
Thanks
Upvotes: 1
Views: 239
Reputation: 596
const admin = require("firebase-admin");
var message = {
notification: {
title: '$GOOG up 1.43% on the day',
body: '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.'
}
};
admin.messaging().sendToDevice(token,message)
Upvotes: 2