Settings

Contents

Overview

This topic is for legacy Social Sharing v2 support only. For all new integrations, please see the current Social Sharing documentation.
When the Social Sharing solution is first launched, it applies these settings either by accessing the stored configuration in the application or from embedded code on the client page.

Using the API, it is possible to change the settings on a page-by-page basis, customizing the solution to meet your needs.

Settings

Field Value Description
embed truefalse When set to true, the UI appears embedded on the client web page. If false, the UI appears as modal (appearing in a pop-up). When embedded, the UI renders inside the element with an ID of janrainEngageShare.
previewMode 0–3 The previewMode affects the preview shown in the Dashboard when you design the UI.

  • 0 − Turns preview off
  • 1 − General preview mode (disable sign-in, auto-reveal UI)
  • 2 − Mode for configuring providers
  • 3 − Mode for configuring email providers
providers A comma-separated list of identity providers. Used to define the providers used by Social Sharing.
providersEmail A comma-separated list of identity providers. Defines the providers that are available in the Email tab, which shares the activity by email instead of the social network.
modes broadcast or contact Dictates the ways in which Social Sharing can share. Choosing broadcast posts the activity to your own wall or stream. Choosing contact shares the activity with specified contacts through the provider. The provider sends direct messages in whatever manner the provider chooses.

If contact, both the userId and userIdentifier must be provided. See the example at the end of the topic.

Note: The mode cannot be set for the Email tab. It is permanently set to contact.

setState Widget styles Allows the administrator to apply changes to settings in bulk.
getState none or Parameter Returns data showing the current settings of the UI. Returns all values (styles, automatic settings, settings) as an object. If a parameter is defined, getState returns the object only for that parameter.
resetState true, false Resets the settings to a default state.
translate JSON object matching text keys to new text Overwrites the default text in the UI. The value is a JSON object that matches text keys with new default text. Keys not present in the object retain the original text values.

These features require service level: Pro, Enterprise

Field Value Description
custom true, false When set to true, custom bypasses all other regular Settings fields and makes LoginSend, and LoginAndSend available. This is used to launch Social Sharing while bypassing rendering of the UI. Developers who design the appearance of the UI in code instead of using the Dashboard use custom to allow this customized implementation to share content. See Customize the Appearance of The Social Login UI for more information.
shortenUrl true, false Overrides the default set in the Janrain application. When set to true, shared URLs are shortened using the Janrain URL-shortening service. If false, shared URLs are not modified.

Sharing To a Facebook Fan Page

Social Sharing can be configured to share to a destination fan page instead of to the wall of the user sharing the content. To do this, you need the Object ID of the fan page (as defined by Facebook).

Field Value Description
objectId Numerical object ID code The object ID code assigned to the Facebook fan page.

Contact Example

The following code is an example of a contact share using LinkedIn.

Note: LinkedIn uses the same value for userId and userIdentifier, but you must still pass both.