Socialid.login.startLoginClick

(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
 
== Description ==
 
== Description ==
  
Abre o diálogo (popup) de login para um determinado provedor de login ao se clicar em um elemento do DOM.
+
Starts the social login process for the given provider when the user clicks on a DOM element. It could open a popup dialog or redirect to the provider, depending on the [[socialid.login.init|loginType]].
  
O uso deste método pode disparar os eventos:
+
This method can trigger the following events:
 
* [[socialid.events.onLoginStart]]
 
* [[socialid.events.onLoginStart]]
 
* [[socialid.events.onLoginSuccess]]
 
* [[socialid.events.onLoginSuccess]]
Line 17: Line 17:
 
{|
 
{|
 
! align="left" width="200px" | elementId
 
! align="left" width="200px" | elementId
| width="200px" | obrigatório
+
| width="200px" | required
| Id de um elemento do documento.
+
| Id of a DOM element.
 
|+
 
|+
 
! align="left" width="200px" | provider
 
! align="left" width="200px" | provider
| width="200px" | obrigatório
+
| width="200px" | required
| Especifica o provedor que se deseja iniciar o processo de login. Pode ser "facebook", "twitter", "linkedin" ou "gplus".  
+
| Determines which provider will be used in the login process. It could be "facebook", "twitter", "linkedin" or "gplus".
 
|}
 
|}
  
 
== Example ==
 
== Example ==
  
Inicia o diálogo de login para o Twitter quando o usuário clicar no elemento "twitter_login":
+
It opens a popup starting the login dialog with Twitter when the user clicks on the "twitter_login" element:
  
 
   socialid.login.init(1, {loginType: "event"});
 
   socialid.login.init(1, {loginType: "event"});
 
   socialid.login.startLoginClick("twitter_login", "twitter");
 
   socialid.login.startLoginClick("twitter_login", "twitter");
  
Teste os parâmetros em nosso playground: https://sid-examples.herokuapp.com/social_logins/playground
+
You can test this parameters in our playground: https://sid-examples.herokuapp.com/social_logins/playground

Revision as of 17:39, 3 November 2014

Contents

Description

Starts the social login process for the given provider when the user clicks on a DOM element. It could open a popup dialog or redirect to the provider, depending on the loginType.

This method can trigger the following events:

Usage

 socialid.login.startLoginClick(elementId, provider)

Parameters

elementId required Id of a DOM element.
provider required Determines which provider will be used in the login process. It could be "facebook", "twitter", "linkedin" or "gplus".

Example

It opens a popup starting the login dialog with Twitter when the user clicks on the "twitter_login" element:

 socialid.login.init(1, {loginType: "event"});
 socialid.login.startLoginClick("twitter_login", "twitter");

You can test this parameters in our playground: https://sid-examples.herokuapp.com/social_logins/playground

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox