The content on this page deals with a legacy feature of the Akamai Identity Cloud (in this case, social sharing). If you are currently an Identity Cloud customer and are using social sharing, that feature is still supported. However, if you’re new to the Identity Cloud, social sharing is no longer available.
If you are using a pre-built integration, Social Sharing v3 currently is only supported in the Drupal – Social Login Integration.
From the Widgets and SDKs section of your application home page, click Sharing to configure the providers to be used for sharing. Click the gear icon next to any providers that will be used for authenticated or email sharing. Follow the instructions as prompted in the dashboard or as listed in the Social login configuration guides. Note that providers regularly change or update their developer tools. We try to keep directions as up-to-date as possible, but some steps may differ slightly from the current documentation.
After a provider has been set up with all required fields, the gear icon will turn green, and you will be able to select the provider to add to your code. If you are using only native share providers, no configuration is required before you will be able to add them to your code.
From the Settings section on your application home page, click domains. Add *.janrain.com to the Domain Whitelist and click Save.
This is required for authenticated or email sharing. If this domain is not allow listed you will see the following error message: “The token URL or xdReceiver has not been whitelisted.”
Social Sharing functionality is enabled by adding three code elements to a webpage:
- a DIV element with a CSS class of janrainSocialPlaceholder and attributes
- defining the activity, description, and type of sharing to be enabled the
- settings for the sharing behavior and UI
The HTML placeholder should be placed wherever you want the sharing widget to appear. 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>
The scripts should be placed at the bottom of your site’s tag. Example:
If you are also using Social Login, janrain.settings.appUrl may already be defined on the page. If so, do not include it in the sharing configuration script.
All links included in a share to a social network will be automatically shortened using the rpx.me domain by default. Shares made by email will include the full-length URL.
For Pro and Enterprise customers, URL shortening may be toggled on and off in the share configuration using the shorten-url attribute . Set this to false to turn URL shortening off.
If you would like to use a third party URL shortening service so that your links use a custom domain rather than rpx.me, follow these steps:
Add a CNAME entry in your DNS for the custom domain pointing to rpx.me.
Log in to dashboard.janrain.com.
Click the sharing application’s Manage Engage App button.
On the Home page under Settings, click General Settings.
On the Application Settings page under Custom URL Shortening, enter the custom domain to be used for sharing and click the Save button.
The CNAME must be in place on the domain and fully propagated for the new URL shortener to work:
The Twitter count displayed when typing in the message text box takes into account the shortened URL that is being shared. This remains constant no matter what URL shortening service is used, as Twitter uses the same processing for each. A preview of the formatted message will display just below the textbox.
An Authenticated Share is an activity shared to a user’s wall or status, a friend’s wall, the wall of a group to which the user belongs, or other social network update using the UI and the provider’s sharing APIs. This functionality requires the provider to be configured with your Social Login application.
A Native Share is an activity shared to a user’s wall or status, a friend’s wall, the wall of a group to which the user belongs, or other social network update using the provider’s native sharing UI and APIs. This functionality does not require any configuration in your Social Login application since it does not display the Identity Cloud sharing interface or require the user to authorize the application to share. Note that native sharing will not be reported to the analytics dashboard.
An Email Share is an activity shared directly to another user via a designated email service. Email sharing may be completed through a supported provider configured with your Social Login application or through a user’s native email client.
Updated 8 months ago