Socialid.login.startLogin
(Difference between revisions)
Renato.neves (Talk | contribs) (→Description) |
Renato.neves (Talk | contribs) (→Parameters) |
||
Line 17: | Line 17: | ||
{| | {| | ||
! align="left" width="200px" | provider | ! align="left" width="200px" | provider | ||
− | | width="200px" | | + | | width="200px" | required |
− | | | + | | Determines which provider will be used in the login process. It could be "facebook", "twitter", "linkedin" or "gplus". |
|} | |} | ||
Revision as of 17:28, 3 November 2014
Contents |
Description
Starts the social login process for the given provider. It could open a popup dialog or redirect to the provider, depending on the loginType.
This method can trigger the following events:
- socialid.events.onLoginStart
- socialid.events.onLoginSuccess
- socialid.events.onLoginCancel
- socialid.events.onLoginError
Usage
socialid.login.startLogin(provider)
Parameters
provider | required | Determines which provider will be used in the login process. It could be "facebook", "twitter", "linkedin" or "gplus". |
---|
Example
Inicia o diálogo de login para o Facebook quando o usuário clicar no botão "facebook_login":
socialid.login.init(1, {loginType: "event"}); facebook_button = document.getElementById("facebook_login"); facebook_button.onclick = function() { socialid.login.startLogin("facebook"); };
Teste os parâmetros em nosso playground: https://sid-examples.herokuapp.com/social_logins/playground