Share your pages on Social Networking websites


To share your pages on social Networking sites is an easy Task now.

You can share your page to your friend on their WhatsApp also.

Click Here to download the script needed to run WhatsApp share.

<script type="text/javascript">if(typeof wabtn4fg==="undefined"){wabtn4fg=1;h=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript";s.src="http://www.itrusoft.com/blogbysid/blogfiles/whatsapp-button.js";h.appendChild(s);}</script>

replace the existing URL with your site URL and link the whatsapp JS to it.

<?php
$shareSource = urlencode('blogbysid.wordpress.com');
$shareActualUrl = 'https://blogbysid.wordpress.com/2013/09/03/google-maps-in-grayscale/';
$shareActualTitle = 'Google Maps in Grayscale';
$shareUrl = urlencode($shareActualUrl);
$shareTitle = urlencode($shareActualTitle);
$shareDescription = urlencode('This example displays a grayscale saturation in Google maps:');
$shareImgSrc = urlencode('https://blogbysid.files.wordpress.com/2013/09/gray-google-map.jpg');
$hashtags = 'blogbysid'; // comma separated list of hashtags, with no # on them
?>

replace these title, links with yours

The below code generates the link to share your page on respective pages

<a title="WhatsApp" href="whatsapp://send" data-text="<?php echo $shareActualTitle; ?>" data-href="<?php echo $shareActualUrl; ?>" class="wa_btn wa_btn_s">WhatsApp</a>

<a title="Facebook" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $shareUrl; ?>&t=<?php echo $shareTitle; ?>">Facebook</a>

<a title="Twitter" target="_blank" href="https://twitter.com/share?text=<?php echo $shareTitle; ?>&url=<?php echo $shareUrl; ?>&hashtags=<?php echo $hashtags; ?>">Twitter</a>

<a title="Google Plus" target="_blank" href="https://plus.google.com/share?url=<?php echo $shareUrl; ?>">Google Plus</a>

<a title="LinkedIn" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php echo $shareUrl; ?>&title=<?php echo $shareTitle; ?>&summary=<?php echo $shareDescription; ?>&source=<?php echo $shareSource; ?>">LinkedIn</a>

<a title="Pinterest" target="_blank" href="https://pinterest.com/pin/create/button/?url=<?php echo $shareUrl; ?>&media=<?php echo $shareImgSrc; ?>&description=<?php echo $shareDescription; ?>">Pinterest</a>
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Google+ photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s