Twitter Share Post Link



PHP/HTML Body Code:
<?php 
$shareLink = 'https://www.google.com/maps/';
$linkSocial= '<a class="popup_twitter" href="https://twitter.com/share?url='.$shareLink .'">TWITTER</a>';
echo $linkSocial;

?>

JavaScript/jQuery Code:
<script type="text/javascript">
 jQuery(document).ready(function($) {
  $('.popup_twitter').click(function(event) {
var width = 575,
height = 400,
left = ($(window).width() - width) / 2,
top = ($(window).height() - height) / 2,
url = this.href,
opts = 'status=1' +
',width=' + width +
',height=' + height +
',top=' + top +
',left=' + left;
window.open(url, 'twitter', opts);
return false;
});
 });

 </script>

Share on Google Plus

About Ram Pukar

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment