Saturday, February 04, 2012

New API method to share campaigns on social networks

We've launched a new API method, GetViewAsWebPageURL, that retrieves a URL for a campaign that can be shared on social networks like Facebook, Twitter, and LinkedIn.

Below is a screenshot of how to call the method from our test form at

The result is a string which is the URL that can then be shared.

In this case, the URL generated is This URL can now be shared on social networks.

Additionally, if the EmailAddress input parameter is identified, a URL customized for that particular recipient will be generated.  In addition to the j= parameter, an m= parameter will also be present in the URL's querystring.  For mass sharing, however, the most common use will be to share without personalization specific to a recipient.

Why is this useful?

If you use the API to create campaigns on the fly, using the SendMassEmail method, then the API will return the campaign ID to your application.  You can then use that campaign ID to immediately generate a URL for that email campaign that can be shared.  This is analagous to the "View as Web Page" link that you can insert at the bottom of an email campaign when using the web interface.