Gigya offers a Simple Share mode to the Share add-on, which enables your users to share a page to selected social networks and bookmark destinations. The Simple Share allows users to publish feed stories without having to be connected to the site.
How it Works
The Share add-on has two operation modes, either a multiple selection share or a simple share. The operation mode is selected using the operationMode parameter of the showShareUI API method, which has three optional values:
- 'multiSelect' (default) - The Share add-on will use the multiple selection mode, which displays a more elaborate UI, where the user can share content on multiple social networks (refer to the Share add-on section for a screenshot and a detailed explanation). Use this mode when you want to encourage your users to be connected.
- 'simpleShare' - The Share add-on will use the simple share mode, which displays a simple UI, where the user can select a single social network to which to share content. In this mode the user can use the Share add-on without being connected.
- 'autoDetect' - The Share add-on will use either multiselect or simple share, according to the user's connection status; if the user is connected the multiselect mode will be displayed, and if the user is not connected the simple share mode will be displayed. This is the best practice, since you will be able to provide the optimal share mode for each user according to his connection status.
The simple share mode is enabled by setting the operationMode parameter of the socialize.showShareUI API method to "simpleShare" or to "autoDetect":
Please refer to the Share add-on working code example, where the auto detection mode is used.
Set up the tags to get a better structured news feed post on Facebook ('like'), Twitter and Google (+1), and invoke the 'share' dialog by adding facebookDialogType: 'share' to the params object, as the default 'Feed' dialog was deprecated by Facebook. Read more on how to define OG-tags on the 'Content Sharing' page.
Post Share Connection
The Share add-on in simple mode allows users to publish feed stories without having to be connected to your site. In order to encourage your users to connect to your site, there is an optional feature that allows you to offer the user to connect after sharing. In simple share mode, after the user clicks on a button of a social network that supports social login, a dialog is displayed, offering the user to sign into your site through the selected social network.
For example, if the user wishes to share on Facebook, after clicking the share button and selecting Facebook as the social destination for sharing, the following dialog is displayed:
The user can now sign into your site with Facebook, allowing simpler sharing in the future.
First, make sure the the simple share mode is enabled by setting the operationMode parameter of the showShareUI API method to "simpleShare" or to "autoDetect".
To add the 'Post Share' connection dialog, add a parameter named simpleShareConfig to the showShareUI API method:
The simpleShareConfig parameter accepts a JSON object with the following optional members:
- postShareAction - accepts two values: "close" (default) and "connect". Use "connect" to activate the 'Post Share' connection dialog.
- 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".
Simple Share UI in Mobile View
When the socialize.showShareUI deviceType parameter is set to mobile, the simple share UI is displayed in the mobile mode: