Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 3345 | Rev 3347 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

<?php 

$this->headMeta()->appendName('og:url', "$share_url");
$this->headMeta()->appendName('og:title', "$share_title");
$this->headMeta()->appendName('og:description', "$share_description");
$this->headMeta()->appendName('og:image', "$share_image");



$this->inlineScript()->captureStart();
echo <<<JS
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
JS;
$this->inlineScript()->captureEnd();

?>

<a href="<?php echo $share_url ?>">
<img src="<?php echo $share_image ?>"  style="width: 200px; height: auto"/>
</a>


<!-- Load Facebook SDK for JavaScript -->
<div id="fb-root"></div>


<!-- Your share button code -->
<div class="fb-share-button" 
data-href="<?php echo $share_url?>" 
data-layout="button_count">
</div>