GetSocialPublishURLByName()

Returns HTML code for sharing a content region on a supported social network. Use this function with the Social Forward feature of Marketing Cloud Engagement.

Availability 

Marketing Cloud Engagement ✅ Yes
Marketing Cloud Next ❌ No

Syntax 

1GetSocialPublishURLByName(socialNetworkName,
2                          countryCode, contentRegion,
3                          socialNetworkParamKey, socialNetworkParamValue)

The GetSocialPublishURLByName() function has five parameters:

  • socialNetworkName (string): Required. The name of the social network.
  • countryCode (string): Required. An ISO country code.
  • contentRegion (string): Required. The name of the content region to share on the social network.
  • socialNetworkParamKey (string): The key of a parameter to pass to the target social network.
  • socialNetworkParamValue (string): The value of a parameter to pass to the target social network.

You can pass multiple key-value pairs for parameters by appending them to the end of the function.

Supported Social Networks 

This function supports these social networks.

This list includes several social media sites that are no longer active as of 2023. This list is provided for completeness.

Note

  • Del.icio.us
  • Digg
  • Facebook
  • Google
  • Google+
  • LinkedIn
  • Microsoft
  • MySpace
  • ShareThis
  • StumbleUpon
  • Twitter
  • Yahoo

Usage 

1<!-- RegionStart[ name:'Shared content region 1',
2title:'First shared email content',
3description:'This is an example of shared content',
4csskey:'portfolio css 1'] -->
5<tablewidth='100%'bgcolor='#FFFFFF'border='0'bordercolor=''cellpadding='5'cellspacing='0'>
6<tr>
7<tdstyle='font-family:Arial; font-size:13px'>
8<imgsrc='http://example.com/images/logo.jpg' title='logo'align='left'border='0'/>
9<p id='text-placeholder'style='margin-top: 0px; margin-bottom: 0px;'>This is an example of a shared content area!&amp;nbsp; Please feel free to pass on this information!<br/>
10<br/></p>
11<!-- Creates a link to share this content with facebook -->
12<a href='%%=GetSocialPublishURLByName('Facebook','US','Shared content region 1')=%%' alias='Social Forward to Facebook' title='Publish to Facebook'>
13<img src='http://images.dev2.et.local/lib/ffcf14/m/1/social_default_facebook_icon.jpg' alt='Facebook' title='Facebook' border='0'></a>
14</td>
15</tr>
16</table>
17<!-- RegionEnd[ name:'Shared content region 1'] -->

See Also