Description
Unsubscribes the user from receiving Web Push Notifications.
Usage
socialid.webPush.unsubscribe(handler)
Parameters
handler
|
optional
|
A callback function to handle the unsubscribe response.
|
API Response
status
|
The API response status. Can be success, if the user subscription was successfully disabled, or an error status otherwise. Notice that if the user didn't have a subscription, an error will be shown instead and the handler won't be called.
|
Example
socialid.webPush.unsubscribe(function(response) {
if (response.status == "success") {
alert("You have been unsubscribed successfully!");
} else {
alert("Could not unsubscribe you.");
}
});