0

I currently have this code for our social share buttons. The twitter seems to work although doesn't seem to post the image but not the others. But if I do it from my mobile it does work.

<div class="share{if article_author} byline{/if}">
    <span class="pull-left">Share:</span> 
    <a target="_blank" href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.example.com%2Fabout&amp;text={exp:url_encode}Business News: {title}{/exp:url_encode}&amp;tw_p=tweetbutton&amp;url={exp:url_encode}http://www.example.co/section/news/{url_title}{/exp:url_encode}">
        <img src="/assets/images/share_btn_twitter.jpg" alt="Share this page on Twitter" width="39" height="19">
    </a>
    <a onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.example.com/section/news/{url_title}','facebook-share-dialog','width=626,height=436');return false;" href="#">
        <img src="/assets/images/share_btn_facebook.jpg" alt="Share this page on Facebook" width="39" height="19">
    </a>
    <a target="_blank" href="https://www.linkedin.com/cws/share?url={exp:url_encode}http://www.example.com/section/news/{url_title}{/exp:url_encode}&title={exp:url_encode}South East Business News: {title}{/exp:url_encode}&source={exp:url_encode}http://www.example.com{/exp:url_encode}">
        <img src="/assets/images/share_btn_linkedin.jpg" alt="Share this page on Linked In" width="39" height="19">
    </a>
    <a href="javascript:window.print();">
        <img src="/assets/images/share_btn_print.jpg" alt="Print this page" width="39" height="19">
    </a>
</div>
  • Can you say more about what's not working? – AllInOne Dec 12 '16 at 18:54
0

This is good you have write so many URLs to share the site on social media. You can shorten all this just by using ShareThis or AddThis.

Visit below URLs:

http://www.sharethis.com/

http://www.addthis.com/

| improve this answer | |
  • Beware though, AddThis code is a major bottleneck to page load. If performance is a concern, keep on the path you are currently on. – stuartmcd69 Dec 12 '16 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.