Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $link_share = "http://yourdomain.com/uri_here";
- $twitter_param = array(
- "text" => urlencode("title here"),
- "url" => $link_share //note url as last to prevent ? from failing in url
- );
- $linkedin_param = array(
- "url" => $link_share
- );
- $fb_param = array(
- "t" => urldecode("title here"),
- "u" => $link_share
- );
- ?>
- <div class="social">
- <a href="https://twitter.com/share?<?=http_build_query($twitter_param)?>" class="twitter" target="_blank">
- </a>
- <a href="http://www.facebook.com/sharer.php?<?=http_build_query($fb_param)?>" onClick="" class="fb" target="_blank">
- </a>
- <a href="https://www.linkedin.com/cws/share?<?=http_build_query($linkedin_param)?>" class="linkedin" target="_blank">
- </a>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement