Social Sharing JavaScript API: Instance Settings

These settings define the activity, description, and type of sharing to be enabled. They may be defined on any HTML element with the class janrainSocialPlaceholder as data-janrain-* attributes. These settings will override the corresponding settings defined globally in the JavaScript object janrain.settings.social.

Example:


<div
 class="janrainSocialPlaceholder"
 data-janrain-url="http://www.google.com/"
 data-janrain-title="Share this!"
 data-janrain-description="This is a cool thing"
 data-janrain-image="http://www.coolmath.com/fractals/images/fractal11.gif"
 data-janrain-message="Hey come look at this amazing thing!"
></div>

description

string

The description that appears in the preview of the shared object. Not editable by the user.

form-factor

Default: bar
Overrides: formFactor string

See the Global Settings section for details. This value will override anything set for janrain.settings.social.formFactor.

image

string

The full URL path to an image associated with the content being shared.

message

string

The preset text populated in the message that users may edit when sharing content.

mode

Default: broadcast string

Available values are broadcast or contact. Determines whether the share activity will be posted to the user’s own wall or stream or to specified contacts through the provider. Providers available in contact mode are:

  • LinkedIn
  • Mixi
  • Twitter
  • Xing
  • all email providers

orientation

Default: horizontal
Overrides: orientation string

See the Global Settings section for details. This value will override anything set for janrain.settings.social.orientation.

providers

Overrides: providers array

See the Global Settings section for details. This value will override anything set for janrain.settings.social.providers.

share-count-min

Default: -1
Overrides: shareCountMin integer

See the Global Settings section for details. This value will override anything set for janrain.settings.social.shareCountMin.

share-count-mode

Default: none
Overrides: shareCountMode string

See the Global Settings section for details. This value will override anything set for janrain.settings.social.shareCountMode.

shortenUrl

Default: true boolean

Available values are true or false. By default, shared URLs will be shortened with the rpx.me domain or a custom URL shortening service if configured in the Janrain dashboard. See Configure URL Shortening for more information.

subject

string

The subject line to be used for an email share. If not specified, title will be used as the subject line.

title

string

The title given to the shared content.

url

string

The URL associated with the content being shared.