Socialid.events.onConnectError

(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
 
== Description ==
 
== Description ==
  
Executado quando algum erro acontece durante o processo de conexão de uma nova credencial.
+
Executed when an error occurs during the connection to a new credential.
  
 
== Adding Handler ==
 
== Adding Handler ==
Line 14: Line 14:
 
|+
 
|+
 
! align="left" width="200px" | provider
 
! align="left" width="200px" | provider
| O provider utilizado pelo usuário na conexão. Pode ser "facebook", "twitter", "linkedin" ou "gplus".
+
| Provider used in the connection. Can 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 conexão de um novo provedor à conta do usuário.
+
| The error code returned during the connection.
 
|}
 
|}
  
Line 24: Line 24:
 
{|
 
{|
 
! align="left" width="200px" | unauthorized
 
! align="left" width="200px" | unauthorized
| Não foi possível obter o token de acesso do usuário pois o código de login expirou ou as credenciais da aplicação estão inválidas.
+
| It wasn't possible to get the access token for the user because the login code expired or the application credentials are invalid.
 
|+
 
|+
 
! align="left" width="200px" | request_timeout
 
! align="left" width="200px" | request_timeout
| A rede social demorou a responder a requisição para fornecer o token de acesso do usuário.
+
| The social network took too long to return the access token.
 
|+
 
|+
 
! align="left" width="200px" | service_unavailable
 
! align="left" width="200px" | service_unavailable
| A rede social não está disponível no momento.
+
| The social network is not available right now.
 
|+
 
|+
 
! align="left" width="200px" | conflict
 
! align="left" width="200px" | conflict
| A credencial utilizada já está associada a outro usuário do Social Login. Neste caso deve-se desconectar a credencial do outro usuário para poder conectar ao usuário atual.
+
| This credential is already associated with another Social Login user. In this case, disconnect the other user's credential to allow the connection for the current user.
 
|+
 
|+
 
! align="left" width="200px" | blocked
 
! align="left" width="200px" | blocked
| A Conta de Marketing não está mais recebendo logins pois atingiu o número máximo de contatos do plano.
+
| This Marketing Account is not receiving new logins because it hit the maximum number of contacts for its plan.
 
|+
 
|+
 
! align="left" width="200px" | internal_server_error
 
! align="left" width="200px" | internal_server_error
| Um erro desconhecido ocorreu.
+
| An unknown error occurred.
 
|}
 
|}
  
 
== Example ==
 
== Example ==
  
Adicionando um handler para o evento onConnectError do widget de Social Connect:
+
Adding a handler for the onConnectError event of the Social Connect widget:
  
 
   socialid.events.onConnectError.addHandler(function(data) {
 
   socialid.events.onConnectError.addHandler(function(data) {
Line 50: Line 50:
 
   });
 
   });
  
Exemplo de resposta do objeto data ao acontecer um erro de conflito no login:
+
Example response object:
  
 
   {
 
   {

Revision as of 20:00, 3 November 2014

Contents

Description

Executed 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 Social Login user. In this case, disconnect the other user's credential to allow the connection for the current user.
blocked This Marketing Account is not receiving new logins because it hit the maximum number of contacts for its plan.
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