Page History

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

RequiredNameTypeDescription
Yes
userActionUserAction objectThe user action to publish. The UserAction object enfolds the newsfeed data, including text, media, link, etc.  
Notes:
  • A shared URL must match the approved URLs (domains) for the specified API  key, otherwise the share will not work. 
  • When Twitter is the provider, only the Title and Link Back are posted.
No
actionAttributesJSON objectIn Loyalty - Gamification and User Behavior users receive points for actions performed on your site, in this case sharing. 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 actionAttributes, each user share action also receives an attribute, for example "tv-show":"glee". 
Include Page
Template_gs api actionAttributes description
Template_gs api actionAttributes description
No
cidstring
Include Page
Template_gs api cid description
Template_gs api cid description

Include Page
Template_gs override params short note
Template_gs override params short note
No
containerIDstringAn ID of a <div> element on the page in which you want to display the plugin. Not supported when the operationMode parameter is set to simpleShare.
If this parameter is not provided then the plugin will be displayed as a popup at the center of the page. Please refer to Dialog or Embedded section for extended explanation.
No
contextobjectA reference to a developer created object that will be passed back unchanged to the event handlers as one of the fields of the eventObj (see extended explanation in the "Plugin Events" section below).
No
deviceTypestringDetermines the type of the device on which the Share plugin UI is displayed i Simple Share  mode . The parameter supports the following values:
  • desktop  (default) - render the share in regular mode
  • mobile  - render the share in mobile view mode 
  • auto  - identify the device (user-agent) and if it is a mobile device, render in the mobile view mode

When Simple Share is set to deviceType mobile or auto (on mobile), clicking the email share will open the mail client rather than the Gigya share UI.

No
disabledProvidersstringA comma delimited list of providers that should not be displayed on this plugin, when in multiple selection mode. Valid provider names include: 'facebook', 'twitter', 'linkedin', 'qq', 'renren', 'sina', 'vkontakte'*.
For example, if you would like this plugin to show all providers icons but LinkedIn and Twitter, define: disabledProviders: "linkedin, twitter".
Include Page
Template_gs override params short note
Template_gs override params short note
No
enabledProvidersstringA comma delimited list of providers that should be displayed on this plugin, when in multiple selection mode (in  Simple Share  mode, the providers that are displayed are listed in moreEnabledProviders). Valid provider names include: 'facebook', 'twitter', 'linkedin', 'qq', 'renren', 'sina', 'vknotakte'*
For example, if you would like this plugin to show only the icons of Facebook and Twitter, define: enabledProviders: "facebook,twitter".
Note: The Share plugin may show up to six social network buttons on its main screen (more social destinations may be shown in the "More" screen).
Include Page
Template_gs override params short note
Template_gs override params short note
No
moreEnabledProvidersstringA comma delimited list of providers that should be displayed on this plugin, when in simple share mode.
No
facebookDialogTypestringApplicable only for sharing through Facebook, and when the 'operationMode' parameter is set to 'simpleShare'.
This parameter determines which Facebook dialog will appear when clicking the share button. Options are:
  • 'share' (default value)
  • 'feed'

When using the 'share' dialog, it is required to implement open graph tags on your page, since Facebook's 'share' as well as other major social networks, use open graph tags to get the news feed item data for the shared item, rather than using data from the 'user action object'. 

No
grayedOutScreenOpacityinteger
(0-100)
This parameter allows you to gray-out the screen behind the plugin to emphasize the "modal" environment. Graying-out covers the entire page behind the plugin with a gray transparent layer. Using this parameter you can define the opacity of the gray layer. The value of this parameter should be a number between 0-100, where:
  • 0 - clear (not grayed out). This is the default, if this parameter is not set.
  • 100 - opaque (blacked out).
  • 20 - is our recommended value for gray-out opacity.
No
initialViewstringDetermines the initial view of the plugin when it loads in Multiple Selection Share mode. There are three options:
  • 'share' (default) - shows the default share view.
  • 'more' - shows the "More" view. This option is only relevant if the  showMoreButton  parameter (see below) is set to 'true'. To learn more, please read the Adding More Destinations page.
  • 'email' - shows the "Email" view. This option is only relevant if the  showEmailButton  parameter (see below) is set to 'true'. To learn more, please read the Sharing via Email page.
No
KeystringUsing this parameter, you can specify all the API keys of the social networks that require an API key, e.g., 'mixiKey'.
Anchor
operationMode
No
operationModestringUsing this parameter determines which Share plugin mode is displayed; either the Multiple Selection Share mode or the Simple Share mode. Please refer to the Simple Share section for an extended explanation. The optional values for this parameter are:
  • 'multiSelect' (default) - Opens the Share plugin with multi-select options, enabling the user to share on multiple social networks.
  • 'simpleShare' - Opens the Share plugin in the Simple Share mode. Note that the containerID  parameter cannot be used in this setting.
  • 'autoDetect' - Automatically opens the Share plugin according to the user's connection status; if the user is connected the Multi-select mode is displayed, and if the user is not connected the Simple Share mode is displayed. 
No
sessionExpirationintegerThis 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.
No
shareTimeoutintegerSets a timeout to the sharing operation. Set this parameter with the maximum number of seconds to wait for sharing operation to be completed. If a timeout occurs, the Share Plugin will close and an onError event will be fired with errorCode=504001 and errorMessage="Share request timeout".
No
shortURLsstring
Include Page
Template_gs api shortURLs description
Template_gs api shortURLs description

Include Page
Template_gs override params short note
Template_gs override params short note
No
showSuccessMessageBooleanUsing this parameter, you may add a success message to the share UI, notifying the user of a successful publish. The default value of this parameter is 'true'. If this parameter is set to 'true', when the syndication process completes, a message would appear to the user, saying: "Message posted successfully". This parameter is available only for the multiple selection share  mode.
No
showTooltipsBooleanThis 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.
No
simpleShareConfigJSON objectIn Simple Share mode, when the user selects a social network for sharing, this parameter enables you to add an option to display a dialog offering to connect the user to your site through the selected social network. The simpleShareConfig parameter accepts a JSON object with the following optional members:
  • postShareAction - accepts two values: "close" (default) and "connect". When "connect" is used, then after the user clicks on a button of a social network that supports authentication, a dialog is displayed, offering to connect the user to your site with the selected social network.
  • postShareConnectCaptionText - The text that is displayed as the header of the connect dialog. The default text is "Thanks for sharing!".
  • postShareConnectBodyText - The text that is displayed in the body of the connect dialog. The default text is "To make sharing even simpler".
This parameter is relevant only when using the Simple Share mode (only if the operationMode parameter (see above) is set to 'simpleShare' or 'autoDetect').
Read more about this feature in the Post Share Connection section.
No
snapToElementIDstringThe ID of the HTML element that triggers the Share plugin. This element determines where the Simple Share plugin is displayed on the screen. This parameter is relevant only when using the Simple Share mode (only if the operationMode parameter is set to 'simpleShare' or 'autoDetect').
No
tagsstringA comma separated list of tags that are used to identify the share operation.
No
UserActionUserAction objectIt is possible to specify different content to publish for each social network. For this purpose, the method supports a set of parameters with the same name format: (i.e. facebook, twitter etc.) followed by "UserAction". For example: twitter UserAction - specifies the content to be used specifically when publishing to Twitter.
Each of these optional parameters accepts a UserAction object and if specified override the userAction parameter when posting to that provider. In other words, the userAction parameter (see above) specifies the default content to be used for all social networks and UserAction specifies the content to be used for the specific network.
No
userMessagePlaceholderstringText that appears as a placeholder for the user message in the shareUI. When the user clicks the user message input box in the shareUI, the text disappears. The default text is "Write your message...".
Deprec
useHTMLBooleanDeprecated. The 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.
Deprec
successMessageBooleanDeprecated. Using this parameter, you may add a success message to the share UI, notifying the user of a successful publication. The default value of this parameter is 'false'. If this parameter is set to 'true', when the syndication process completes, a message would appear to the user, saying: "Message posted successfully".
Auto Share related Parameters:
To learn more about this feature, please read the
Automatic Sharing guide.
No
showAlwaysSharestringThis parameter determines whether to show an "Always share" checkbox at the bottom of the Share Plugin. If the user checks this checkbox and presses "Publish", Gigya will turn on an automatic share for this user. Each time this user repeats the same type of action, Gigya will automatically share the action without prompting the user with the Share Plugin. The type of action is determined using the autoShareActionID parameter (see below). The action will be shared on the Social Networks which the user selected when he checked the "Always share" checkbox. If a Network is no longer connected, the share will fail without notifying the user.
The optional values for this parameter are:
  • 'hide' (default) - do not display the "Always share" checkbox.
  • 'checked' - the "Always share" checkbox is displayed and checked by default.
  • 'unchecked' - the "Always share" checkbox is displayed and unchecked by default.
Note: To apply this feature, you must set both showAlwaysShare and the autoShareActionID parameters.
No
showNeverShareBooleanThis parameter determines whether to show a "Never share" link at the bottom of the Share plugin. If the user clicks this link, the Share plugin will close and Gigya will never prompt the Share plugin when this user repeats the same type of action. The type of action is determined using the autoShareActionID parameter (see below). Note: to apply this feature, you must set both showNeverShare and the autoShareActionID parameters.
No
autoShareActionIDstringUse this parameter to specify a unique identifier for the type of action that the user has performed on your site. For example: "Commented", "Rated", etc.
The user selection (Always/Never Share) will apply only to this ID.
No
autoShareExpirationstringUsing this parameter, you may assign an expiration date/time for the user selection for the specific autoShareActionID. The default is never expire. The expected format is the Unix time format (i.e., the number of seconds since Jan. 1st 1970).
No
autoShareActionDisplaystringUsing this parameter, you may change the default text shown next to the "Always share" checkbox and the "Never share" link. The autoShareActionDisplay string will be appended to the "Always share" and "Never share" strings, i.e. "Always share XXX" and "Never share XXX" where XXX is the autoShareActionDisplay string. The default value of autoShareActionDisplay is the string "this". Note: this field can be no longer than 12 characters.
Events Registration Parameters: 
No
onSendDonefunction refA reference to an event handler function that will be called when the process of publishing the newsfeed to all selected social networks, has finished.
No
onLoadfunction refA reference to an event handler function that will be called when the Plugin has finished drawing itself.
No
onClosefunction refA reference to an event handler function that will be called in one of the following scenarios:
  • If the plugin is displayed as a popup the event will be fired when the plugin closes.
  • If the plugin is embedded in the page the event will be fired when the user clicks a button that indicates the dialog should be closed. In this case the dialog will not hide itself automatically.
No
onErrorfunction refA reference to an event handler function that will be called when an error occurs.
Deprec
onSendfunction refDeprecated . Please use the onSendDone event instead.

...