Displays an Edit Connections plugin, which enables the user to add connections to social networks and to remove existing connections. The plugin is displayed only when the user is logged in.
For each social network to which the user is connected, the plugin displays the user's basic identity information along with a Disconnect link. For the rest of the social networks, the plugin displays a logo and a Connect link.
Design and Customization Options
See it in action by pressing the button:
You may customize the display using the parameters listed below.
Currently the plugin displays, by default, the logos of the following providers: Facebook, Twitter, Google+, LinkedIn, Yahoo!, FourSquare, renren, and Vkontakte. You may customize this list using the enabledProviders and disabledProviders parameters. You may also set the requiredCapabilities parameter to login in order to add more providers such as Google+ and AOL.
The following table lists the available parameters:
|||showTermsLink||Boolean||Show or hide the Terms link. Clicking the Terms link opens Gigya's Legal Notices page.|
A comma-delimited list of provider names to include in the method execution. This parameter gives the possibility to apply this method only to a subset of providers of your choice. If you do not set this parameter, by default all the providers are enabled (i.e., the method applies to all connected providers).facebook, googleplus, instagram, kakao, linkedin, microsoft, mixi, naver, odnoklassniki, renren, twitter, vkontakte, wechat, yahoo, yahoojapan (Note: messenger has been replaced by microsoft, however, for backward compatibility, either can be used).
For example, if you would like the method to apply only to Twitter, define: enabledProviders: "twitter".
Valid provider names include:
A comma-delimited list of provider names to exclude in the method execution. This parameter gives the possibility to specify providers to which you do not want this method to apply. If you do not set this parameter, by default, no provider is disabled (i.e., the method applies to all connected providers).facebook, googleplus, instagram, kakao, linkedin, microsoft, mixi, naver, odnoklassniki, renren, twitter, vkontakte, wechat, yahoo, yahoojapan (Note: messenger has been replaced by microsoft, however, for backward compatibility, either can be used).
For example, if you would like the method to apply to all providers except Twitter, define: disabledProviders: "twitter".
Valid provider names include:
|||showTooltips||Boolean||This parameter's default value is false. If set to true, a tooltip will be displayed when mouse hover over a social network icon. The tooltip presents the social network's full name.|
A comma separated list of any of the following capabilities: Login, Notifications, Actions, Friends, Status, Photos, Contacts. Only providers that are available and support all the required capabilities will be visible.
You can set the requiredCapabilities parameter to login in order to add more providers such as Google+ and AOL.
For detailed information on which providers are supported for different requiredCapabilities settings, see the Social Network Capabilities Table.
|||sessionExpiration||integer||This parameter defines the time in seconds that Gigya should keep the social network session valid for the user. To end the session when the browser closes, please assign the value '0'. If this parameter is not specified, the session will be valid forever.|
A string of maximum 100 characters length. The CID sets categories for transactions that can be used later for filtering reports generated by Gigya in the "Context ID" combo box. The CID allows you to associate the report information with your own internal data. For example, to identify a specific widget or page on your site/application. You should not define more than 100 different context IDs.
|||actionAttributes||JSON object||In Gamification your users receive points for actions they perform on your site, in this case editing a connection grants the user points. Action Attributes may be used to annotate actions with additional information, such as the section of the web site that generated the action. If you set here the actionAttributes, each time a user edits a connection, the action also receives an attribute, for example "tv-show":"glee", which can mean that the action was performed on the Glee page of the site. |
actionAttributes contain a JSON object comprised of a series of attribute keys (categories) with associated values. You can also use a generic "tags" key.
No more than three values can be given, they can be with a single key or each have their own key.
For more information see Variants and Action Attributes. Action attributes are later used to filter GM Plugins by a certain attribute.
|||onLoad||function ref||A reference to an event handler function that will be called when the plugin has finished drawing itself.|
|||onError||function ref||A reference to an event handler function that will be called when an error occurs.|
|||onClose||function ref||A reference to an event handler function that will be called in one of the following scenarios:|
|||useHTML||Boolean||Deprecated. The Login plugin is available in both Flash and HTML versions. By default, the HTML version is used. You may override the default behavior. Setting this parameter with the value 'false', will force Gigya to use the Flash version.|
The single argument, eventObj, contains information about the event and has different fields for different events.
The following tables specify the list of fields available in the eventObj for each event:
onLoad Event Data
onError Event Data
|errorCode||integer||The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table.|
|errorMessage||string||A short textual description of an error, associated with the errorCode, for logging purposes.|
|errorDetails||string||This field will contain the exception info, if available.|
onClose Event Data
Global Event handlers Triggered
To register an event handler use the socialize.addEventHandlers API method. Refer to the onConnectionAdded and onConnectionRemoved event data. Refer to Events to learn more about how to handle events generated by Gigya socialize.