<!doctype html>
<html itemscope itemtype="http://schema.org/Article">
<head>
    <?php 
/**
 * social_share.php
 * Custom template used for the "Social Share" custom post type.
 * The template renders meta tags appropriate for the social network the share was generated for and updates the crawl
 * flag.
 * If the user agent is not a crawler, then the template instead performs a redirection to the exhibition's URL.
 */
while (have_posts()) {
    the_post();
    $shareData = \AWC\SocialPledge\SocialSharePostType::getSocialMetaData();
    $shareData->generateMetaTags();
}
<?php

/**
 * pledge_category_share.php
 * Intermediate page used for sharing.
 *  - generate social share post
 *  - redirect the user to the URL used to share it (depending on the "share" parameter, indicating the social network)
 *
 * Parameters:
 *  - parent_id: parent post id, used to extract campaign information
 *  - img: URL to image being shared
 *  - selected: selected ids (comma-separated)
 *
 * Created By: nico
 * Created On: 11/28/2015
 */
use AWC\SocialPledge\SocialSharePostType;
$parentId = @$_GET['parent_id'] or die("Missing parameter parent_id");
$img = @$_GET['img'] or die("Missing parameter img");
$selected = @$_GET['selected'] or die("Missing parameter selected");
$shareType = @$_GET['share'] or die("Missing parameter share");
$shareData = SocialSharePostType::createSocialShare($img, $shareType, $parentId, $selected);
$shareUrl = $shareData->getShareUrl();
if ($shareUrl) {
    wp_redirect($shareUrl);
}
exit;