Facebook and Twitter sharing


<!– Sharing code Start here –>
<div id=”fb-root”></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: ‘appId’, status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement(‘script’); e.async = true;
e.src = document.location.protocol +
document.getElementById(‘fb-root’).appendChild(e);
}());
</script>
<script src=”//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js” type=”text/javascript”></script>
<script type=”text/javascript”>
$(document).ready(function(){
$(‘#share_button’).click(function(e){
e.preventDefault();
FB.ui(
{
method: ‘feed’,
name: ‘<?php echo $var[‘hosp_name’]; ?>’,
link: ‘<?php echo curPageURL(); ?>’,
picture: ‘<?php echo bloginfo(“url”).”/hospitals-imgs/”.$var[“front_img”]; ?>’,
caption: ‘<?php echo $var[‘hosp_address’].’,’.$var[‘hosp_state’]; ?>’,
description: ”,
message: ”
});
});
});
</script>
<a rel=”nofollow” href=”http://www.facebook.com/share.php?u=<;url>” style=”float: left;” onclick=”return fbs_click()” id=”share_button” class=”ssba” target=”_blank”>
<img src=”http://tuenlacemedico.com/wp-content/uploads/2015/05/Screenshot_4.png” style=”width: 54px!important;margin-top: -10px;” title=”Facebook” class=”ssba” alt=”Share on Facebook”>
</a>
<a href=”http://twitter.com/share” class=”twitter-share-button ssba”
data-text=”<?php echo $var[‘hosp_name’].’, ‘.$var[‘hosp_address’].’,’.$var[‘hosp_state’]; ?>”
data-count=”none” data-via=”chris_camps”>
<img src=”http://tuenlacemedico.com/wp-content/plugins/simple-share-buttons-adder/buttons/somacro/twitter.png” title=”Twitter” class=”ssba” alt=”Tweet about this on Twitter”>
</a>
<script type=”text/javascript”
<!– Sharing code end here –>
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s