Hi everybody.
I set up an account with onesignal.com for push notification.
Because I would like to send push notification to user in a restricted area of the website, I would import in my db their own onesignal identification code. So I will know which device correspond to whom to send custom push Services.
I followed the HTTPS procedure, but from their own explanation I do not understand how to import the UUiD produced by onesignal to my database.
They suggest the following event handler:
OneSignal.push(function() {
OneSignal.on('subscriptionChange', function(isSubscribed) {
if (isSubscribed) {
// The user is subscribed
// Either the user subscribed for the first time
// Or the user was subscribed -> unsubscribed -> subscribed
OneSignal.getUserId( function(userId) {
// Make a POST call to your server with the user ID
});
}
});
});
I do not understand how to integrate it in Wappler (i m not a coder at all!!)
Can someone help me how to import from this script the value of the user and make it available in Wappler?
Any other method from experienced user are always welcomes!
Thank you in advance
Roberto
Last updated: