Configuration Settings

Required Social Login Setting

Social sharing requires coordinating with a Social Login application in order to enable functionality. Both applications share the application URL, defined in the Social Login object: janrain.settings

Note:  if Social Login is already installed on the page, this value does not need to be added. It is already defined in the Social Login javascript.

Field Value Description
appUrl URL The application domain for this application. Available from the Dashboard for this app, under “Settings / App Info.” Note: If your Janrain representative has given you a new custom domain to use, change this setting immediately, or else authentication will not work.

These settings configure how providers are used, and the functionality of the UI.

Javascript object attached to window: janrain.settings.social

Field Value Description
cssUrl URL A path to a CSS resource to be used.
formFactor “bar” or “drawer” Determines whether the widget’s provider buttons are immediately displayed or if they are hidden until activated by clicking a rendered DrawerButton. Choosing bar will render the provider list to be immediately visible. Choosing drawer will hide the provider list until the DrawerButton is clicked ,and then hide it when clicked again.

Defaults to “bar” if not specified.

shareCountMin integer Minimum number of shares before the ShareCount element should be displayed. (Note: The share count does not include those performed via native share methods.)

Defaults to -1 if not specified, enforcing immediate display of the ShareCount element, even if no shares have occurred yet.

shareCountMode “none” or “combined”
  • none — Share count is not displayed.
  • combined — Shows Janrain shares combined with provider shares.
orientation “horizontal” or “vertical” Determines whether the widget’s provider buttons are displayed as a row (horizontal) or column (vertical).

Defaults to “horizontal” if not specified.

providers List of comma separated identity providers Used to define which providers may be used for sharing. Values:

Require configuration (see Overview for more detail):
facebook
twitter
linkedin
mixi
xing
tencentweibo
qq

Do not require configuration:
native-googleplus
native-facebook
native-reddit
native-tumblr
native-twitter
native-linkedin
native-sinaweibo
native-mixi
native-pinterest
native-xing

Email Providers (require configuration, see Overview for more detail):
email-google
email-yahoo
email-mailto

providerFormats Nested JSON object with key/value pairs Maps a custom provider share messaging format to a named provider. Initial key is that of the provider (e.g., “facebook”). Value is an object with key of “message” and a value of the custom message. Example:

providerFormats: {
 twitter: {
   message: "{{ message }} - {{ url }}"
 },
 mixi: {
   message: "{{ message }} - {{ url }}"
 },
}

Attributes that can be used as variables within the customer message are:

  • description
  • image
  • media
  • message
  • title
  • url
providerIcons JSON object with key/value pairs Maps a custom icon’s URL to a named provider. Key is that of the provider (e.g., “facebook”) and value is the URL of the image to use in place of Janrain’s default.

providerIcons Example

janrain.settings.social.providerIcons = {
  facebook: "https://example.com/facebook.png",
  "native-facebook": "https://example.com/facebook2.png"
};