Socialid.login.renderLoginWidget
From Social ID Developers
(Difference between revisions)
Renato.neves (Talk | contribs) (→Parameters) |
Ivan.filho (Talk | contribs) (→Example) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
Renders the Social Login widget within a DOM element. | Renders the Social Login widget within a DOM element. | ||
− | + | See also: | |
− | * [[socialid. | + | * [[socialid.login.startLogin]] |
− | + | ||
− | + | ||
− | + | ||
== Usage == | == Usage == | ||
Line 30: | Line 27: | ||
! align="left" width="200px" style="padding-left: 20px" | providers | ! align="left" width="200px" style="padding-left: 20px" | providers | ||
| width="200px" | optional | | width="200px" | optional | ||
− | | Array containing one or more providers enabled to the user log in. The following providers are currently supported: "facebook", "twitter", "linkedin" | + | | Array containing one or more providers enabled to the user log in. The following providers are currently supported: "facebook", "twitter", "linkedin", "gplus", "instagram" and "apple". Default: [] (no providers enabled). |
|+ | |+ | ||
! align="left" width="200px" style="padding-left: 20px" | language | ! align="left" width="200px" style="padding-left: 20px" | language | ||
Line 51: | Line 48: | ||
== Example == | == Example == | ||
− | It renders the Social Login Widget within the "socialid_login_container" DOM element in Brazilian Portuguese ("pt_br"), with Facebook, Twitter, LinkedIn | + | It renders the Social Login Widget within the "socialid_login_container" DOM element in Brazilian Portuguese ("pt_br"), with Facebook, Twitter, LinkedIn, Google+, Instagram and Apple available to login: |
socialid.login.init(1, {loginType: "event"}); | socialid.login.init(1, {loginType: "event"}); | ||
socialid.login.renderLoginWidget("socialid_login_container", { | socialid.login.renderLoginWidget("socialid_login_container", { | ||
theme: "bricks", | theme: "bricks", | ||
− | providers: ["facebook", "gplus", "twitter", "linkedin"], | + | providers: ["facebook", "gplus", "twitter", "linkedin", "instagram", "apple"], |
language: "pt_br", | language: "pt_br", | ||
showSocialIdLink: true, | showSocialIdLink: true, | ||
− | loadCss: true | + | loadCss: true |
}); | }); | ||
You can test this parameters in our 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 |
Latest revision as of 20:40, 26 February 2020
Contents |
Description
Renders the Social Login widget within a DOM element.
See also:
Usage
socialid.login.renderLoginWidget(containerId, options)
Parameters
containerId | required | Id of the DOM element where the widget will be inserted. | options | optional | A Javascript object containing additional parameters. | theme | optional | Determines which theme will be used to build the widget. Can be "icons", "bricks" ou "labeled_icons". Default: "icons". | providers | optional | Array containing one or more providers enabled to the user log in. The following providers are currently supported: "facebook", "twitter", "linkedin", "gplus", "instagram" and "apple". Default: [] (no providers enabled). | language | optional | Defines which translation will be used in the widgets. Can be "pt_br" (Brazilian Portuguese) ou "en" (English). Default: "en". | showSocialIdLink | optional | Determines if the "Powered by Social-ID NOW" link will be displayed in the widget or not. Can be true or false (boolean). Default: true. | loadCss | optional | Determines if the CSS theme file will be automatically added in the web page as a <link> tag. Can be true or false (boolean). Default: true. | cssUrl | optional | Determines the CSS theme file url that will be automatically added in the web page as a <link> tag (only if loadCss is true). Default: "https://app.socialidnow.com/assets/api/themes.css". |
---|
Example
It renders the Social Login Widget within the "socialid_login_container" DOM element in Brazilian Portuguese ("pt_br"), with Facebook, Twitter, LinkedIn, Google+, Instagram and Apple available to login:
socialid.login.init(1, {loginType: "event"}); socialid.login.renderLoginWidget("socialid_login_container", { theme: "bricks", providers: ["facebook", "gplus", "twitter", "linkedin", "instagram", "apple"], language: "pt_br", showSocialIdLink: true, loadCss: true });
You can test this parameters in our playground: https://sid-examples.herokuapp.com/social_logins/playground