Socialid.login.startConnect

(Difference between revisions)
Jump to: navigation, search
(Example)
Line 19: Line 19:
 
== Example ==
 
== Example ==
  
It opens a popup starting the login dialog with Facebook when the user clicks on the "facebook_login" button:
+
It opens a popup starting the login dialog with Facebook when the user clicks on the "facebook_connect" button:
  
 
   socialid.login.init(1);
 
   socialid.login.init(1);

Revision as of 17:35, 3 November 2014

Contents

Description

Opens the popup dialog to connect a new provider credential in the current login session.

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.startConnect(provider)

Parameters

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 Facebook when the user clicks on the "facebook_connect" button:

 socialid.login.init(1);
 facebook_button = document.getElementById("facebook_connect");
 facebook_button.onclick = function() {
   socialid.login.startConnect("facebook");
 };

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

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox