Socialid.webPush.unsubscribe

From Social ID Developers
Revision as of 13:45, 17 January 2017 by Gabriel.prado (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.");
   }
 });
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox