---
schema_version: "1"
id: 7f37b911ac533f7e90e6a1a35d69a6be583e7f7caee4b7cde8f0633adaaa8ffb
title: Content Area Sharing using Paste HTML, AMPscript, and Social Markup
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_es_content_area_sharing_paste_html_ampscript.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_es_content_area_sharing_paste_html_ampscript.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 929a53f5f83bfa9de74b976d8640ef9ce4df7231d248b5dbb55f737d4f4b8269
description: The HTML code in this example shares a dynamic piece of content from an Email Studio email to Facebook. The first commented part of the pasted HTML names the content area Shared content Region 1, and the second commented part of the pasted HTML contains the Social Markup link using the GetSocialPublishURLByName() AMPscript function.
products:
  - Marketing
  - Marketing Cloud Engagement
release: "264"
---
# Content Area Sharing using Paste HTML, AMPscript, and Social Markup

The HTML code in this example shares a dynamic piece of content from an Email Studio email to Facebook. The first commented part of the pasted HTML names the content area Shared content Region 1, and the second commented part of the pasted HTML contains the Social Markup link using the GetSocialPublishURLByName() AMPscript function.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_email-264-0-0-production-enus/a0b807ef-dfbb-412c-b26e-310d91f2d6df/images/icon_example.png)

Example

The AMPscript inside of the table refers to a data extension called Offers, and it pulls the content for each subscriber based on the subscriber key contained in the CustomerID column of the Offers data extensions. The content shared by the subscriber remains the static content and doesn't change, no matter who opens the shared content.

```html
<!-- RegionStart[ socialslot:"Shared content region 1",
    title:"First shared email content",
    description:"This is the first test of ExactTarget's social forwarding",
    csskey:"portfolio css 1"] -->
  <table width="100%" bgcolor="#FFFFFF" border="0" bordercolor="" cellpadding="5" cellspacing="0">
    <tr>
      <td style="font-family:Arial; font-size:13px">
        %%[ var @row, @rows, @cnt
         set @rows = LookupRows("Offers","CustomerID",_subscriberkey)
         for (var @cnt = 0 to RowCount(@rows)) do
        ]%%
        %%=Field("Description",Row(@rows,@cnt))=%%
        <br /></p>
         %%[ next @cnt ]%%
        <!-- Creates a link to share this content with Facebook -->
        <a href="%%=GetSocialPublishURLByName('Facebook','US','Shared content region 1')=%%" 
            alias="Social Forward to Facebook" 
            title="Publish to Facebook">
            <img 
                src="http://image.exct.net/lib/ffcf14/m/1/social_default_facebook_icon.jpg" 
                alt="Facebook" 
                title="Facebook" 
                border="0">
         </a>

      </td>
    </tr>
  </table>
<!-- RegionEnd[ socialslot:"Shared content region 1"]--> 
```