I built a simple react-native app using react-native-firebase. I succeed to send a push notification to my device, and then I want to implement if user touch(click) the notification from the device it will redirect to the webpage I attached to.
I installed fcm-node to send the push notification. Code is below
const FCM = require('fcm-node');
const message = {
notification: {
fcmTitle,
body
},
to: token
};
fcm.send(message, function (err, response) {
console.log('response',response);
console.log("error : "+err);
})
So if user click the push notification, it shoud be opening web browser and redirect to page I attach from the code