Socialid.events.onDisconnectError

(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
 
== Description ==
 
== Description ==
  
Executado quando algum erro acontece durante o processo de desconexão de uma credencial.
+
Executed when an error occurs during a disconnection from a credential.
  
 
== Adding Handler ==
 
== Adding Handler ==
Line 14: Line 14:
 
|+
 
|+
 
! align="left" width="200px" | provider
 
! align="left" width="200px" | provider
| O provider que o usuário deseja desconectar. Pode ser "facebook", "twitter", "linkedin" ou "gplus".
+
| The provider to be used to disconnect. It may be "facebook", "twitter", "linkedin", or "gplus".
 
|+
 
|+
 
! align="left" width="200px" | code
 
! align="left" width="200px" | code
| O código do erro que aconteceu durante a desconexão de um provedor da conta do usuário.
+
| The error code returned during the disconnection.
 
|}
 
|}
  
Line 24: Line 24:
 
{|
 
{|
 
! align="left" width="200px" | not_found
 
! align="left" width="200px" | not_found
| Não foi possível obter a conexão atual do usuário (usuário deslogado).
+
| It wasn't possible to obtain the current connection for this user (user not logged in).
 
|+
 
|+
 
! align="left" width="200px" | internal_server_error
 
! align="left" width="200px" | internal_server_error
| Um erro desconhecido ocorreu.
+
| Unknown error.
 
|}
 
|}
  
 
== Example ==
 
== Example ==
  
Adicionando um handler para o evento onDisconnectError do widget de Social Connect:
+
Adding a handler for the onDisconnectError event of the Social Connect widget:
  
 
   socialid.events.onDisconnectError.addHandler(function(data) {
 
   socialid.events.onDisconnectError.addHandler(function(data) {
Line 38: Line 38:
 
   });
 
   });
  
Exemplo de resposta do objeto data ao acontecer um erro de conexão não encontrada:
+
Example response object when an error occurs:
  
 
   {
 
   {

Revision as of 19:08, 3 November 2014

Contents

Description

Executed when an error occurs during a disconnection from a credential.

Adding Handler

socialid.events.onDisconnectError.addHandler(handler)

Event Data

event onDisconnectError
provider The provider to be used to disconnect. It may be "facebook", "twitter", "linkedin", or "gplus".
code The error code returned during the disconnection.

Error codes

not_found It wasn't possible to obtain the current connection for this user (user not logged in).
internal_server_error Unknown error.

Example

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

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

Example response object when an error occurs:

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