Was this article helpful?

Simple Share

Last modified 10:38, 15 Sep 2014

Gigya offers a Simple Share mode to the Share plugin, 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.

SimpleShare.gif
 

How it Works

The Share plugin 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 plugin 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 Plugin section for a screenshot and a detailed explanation). Use this mode when you want to encourage your users to be connected.
  • 'simpleShare' - The Share plugin 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 plugin without being connected.
  • 'autoDetect' - The Share plugin 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":

var params = { 
    userAction: act,
    facebookDialogType: 'share',
    cid:'',
    operationMode: "autoDetect"
};

 Please refer to the Share Plugin working code example, where the auto detection mode is used.  
 

 
Note: It is required to define Open Graph Tags on pages that use the Share plugin, as some social networks use OG-Tags for page scraping.
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 plugin 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:

SimpleShareConnect.gif

The user can now sign into your site with Facebook, allowing simpler sharing in the future. 

 

Implementation 

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: 

var params = { 
    userAction: act,
    operationMode: "autoDetect",
    cid:'',
    simpleShareConfig: {
            postShareAction:"connect",
            postShareConnectCaptionText:"Add the caption here",
            postShareConnectBodyText:"Add the body text here"
    }
};

 

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:

mobile_simpleshare.gif

 

 
Note: When the Share plugin is set to deviceType mobile or to auto (on mobile), clicking the email share will open the mail client rather than the Gigya share UI. 
Was this article helpful?
Pages that link here
Page statistics
9522 view(s) and 9 edit(s)
Social share
Share this page?

Tags

This page has no custom tags.
This page has no classifications.

Comments

You must to post a comment.

Attachments