Socialid.login.startConnectClick
(Difference between revisions)
Dirceu.tiegs (Talk | contribs) m |
Renato.neves (Talk | contribs) |
||
Line 1: | Line 1: | ||
== Description == | == Description == | ||
− | + | Opens the popup dialog to connect a new provider credential in the current login session when the user clicks on a DOM element. | |
− | + | The operation is similar to [[socialid.login.renderConnectWidget]], except for the fact that no widget will be rendered. The triggered events are the same as the widget. | |
== Usage == | == Usage == | ||
Line 13: | Line 13: | ||
{| | {| | ||
! align="left" width="200px" | elementId | ! align="left" width="200px" | elementId | ||
− | | width="200px" | | + | | width="200px" | required |
− | | Id | + | | Id of a DOM element. |
|+ | |+ | ||
! align="left" width="200px" | provider | ! align="left" width="200px" | provider | ||
− | | width="200px" | | + | | width="200px" | required |
− | | | + | | Determines which provider will be used in the connect process. It could be "facebook", "twitter", "linkedin" or "gplus". |
|} | |} | ||
== Example == | == Example == | ||
− | + | It opens a popup starting the login dialog with Twitter when the user clicks on the "twitter_connect" element: | |
socialid.login.init(1); | socialid.login.init(1); | ||
socialid.login.startConnectClick("twitter_connect", "twitter"); | socialid.login.startConnectClick("twitter_connect", "twitter"); | ||
− | + | You can test this parameters in our playground: https://sid-examples.herokuapp.com/social_logins/playground |
Revision as of 17:44, 3 November 2014
Contents |
Description
Opens the popup dialog to connect a new provider credential in the current login session when the user clicks on a DOM element.
The operation is similar to socialid.login.renderConnectWidget, except for the fact that no widget will be rendered. The triggered events are the same as the widget.
Usage
socialid.login.startConnectClick(elementId, provider)
Parameters
elementId | required | Id of a DOM element. | provider | required | Determines which provider will be used in the connect 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_connect" element:
socialid.login.init(1); socialid.login.startConnectClick("twitter_connect", "twitter");
You can test this parameters in our playground: https://sid-examples.herokuapp.com/social_logins/playground