Get the Code

Once you’ve saved your widget configuration, the widget code is available from the Get the Code page in the dashboard, as shown in Figure 1.

Figure 1: Get the Code

Before integrating the code, you may choose to set several Activity Property Defaults. This optional default text will appear every time the widget is loaded for the user.

Setting Description
Title Adds default text to the title of the activity. See Figure 2, Section B.
Description Adds default text to the description of the activity. This cannot be changed by the user. See Figure 2, Section D.
User Generated Content Adds default text to the user-generated content added to the activity. See Figure 2, Section A.
URL Adds a default URL to the activity being shared. See Figure 2, Section C.
Default Text Areas

Figure 2: Default Text Areas

There are two code snippets to copy:

  • The widget initialization script — This goes in the <head> element of your web page. See Figure 1.
  • A widget placeholder or link — This goes in the <body> element of your web page. Copy the <div> element to the place you want the widget to appear.
To simplify copying, clicking anywhere on either snippet automatically selects the entire snippet.
Once the code is placed in the website that will host the widget, the Social Sharing Widget is ready to be used. Visit the page to make sure the widget is working as expected.

Important Note for Widgets not Designed with the Dashboard:

If you’ve designed your own widget instead of using the Dashboard tools, you must add an additional line of code to the widget initialization script. In the settings block of code between the “can edit below/above this line” markers, add

janrain.settings.custom = true;

Help Us Improve!

Give us your feedback