Socialid.events.onConnectError

From Social ID Developers
Revision as of 17:02, 30 December 2021 by Gabriel.prado (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Description

Triggered when an error occurs during the connection to a new credential.

Adding Handler

socialid.events.onConnectError.addHandler(handler)

Event Data

event onConnectError
provider Provider used in the connection. Can be "facebook", "twitter", "linkedin", or "gplus".
code The error code returned during the connection.

Error codes

unauthorized It wasn't possible to get the access token for the user because the login code expired or the application credentials are invalid.
request_timeout The social network took too long to return the access token.
service_unavailable The social network is not available right now.
conflict This credential is already associated with another Login User. In this case, disconnect the other user's credential to allow the connection for the current user.
blocked This Account is not receiving new logins because it hit the maximum number of contacts for its plan.
user_inactive The user is inactive. See: PUT login/users/:user_id/activate
internal_server_error An unknown error occurred.

Example

Adding a handler for the onConnectError event of the Social Connect widget:

 socialid.events.onConnectError.addHandler(function(data) {
   console.log("Website received onConnectError: ", data);
 });

Example response object:

 {
   event: "onConnectError",
   provider: "twitter",
   code: "conflict"
 }
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox