Socialid.webPush.unsubscribe
From Social ID Developers
(Difference between revisions)
Gabriel.prado (Talk | contribs)
(Created page with "== Description == Unsubscribes the user from receiving Web Push Notifications. == Usage == socialid.webPush.unsubscribe(handler) == Parameters == {| ! align="left" widt...")
(Created page with "== Description == Unsubscribes the user from receiving Web Push Notifications. == Usage == socialid.webPush.unsubscribe(handler) == Parameters == {| ! align="left" widt...")
Latest revision as of 13:45, 17 January 2017
Contents |
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."); } });