URLShortenerHelper ShortenURLsInText Method Kentico 8.1 API Reference
Shortens URLs in given text using selected URL shortener. Throws an exception if shortener is not available for the given site.

Namespace: CMS.SocialMarketing
Assembly: CMS.SocialMarketing (in CMS.SocialMarketing.dll) Version: 8.0.0.0 (8.1.5347.20411)

Parameters

text
Type: OnlineSystem String
Text in that all URLs will be shortened.
shortener
Type: CMS.SocialMarketing URLShortenerTypeEnum
Shortener that will be used for shortening.
siteIdentifier
Type: CMS.DataEngine SiteInfoIdentifier
Determines which site's URL shortener settings are used. Provide null to use global settings.

Return Value

Type: OnlineString
Text with shortened URLs.
Exceptions

ExceptionCondition
OnlineSystem ExceptionShortener is not available for the given site.
See Also