Social media sharing codes(各大網站網址分享功能代碼)

來源:互聯網
上載者:User

Social media is becoming a very important traffic source to one website. We can see social media share buttons or links in most websites ranging from news website to personal
blogs. It is also a very important optimization area where many SEO experts recommend. There are many social medias we can share our links to such as Facebook and Twitter. Most of these website provide share button for us to easily integrate them into our
websites, but these buttons usually have default styles(fixed size, fixed images). If we want to customize these buttons so that they conform to our website design gracefully, we need to know the links these website use to share links on them. We summarize
some of them here.


<!-- Facebook--> <br><a href="http://www.facebook.com/share.php?u=<?php echo $current_url; ?>" target="_blank"><img src="/images/icons/share/32/facebook.png" alt="Share on Facebook" title="Share on facebook"/></a><!--Twitter share--><a href="http://twitter.com/home?status=<?php echo urlencode($title).' '.$current_url; ?>" title="Click to share this post on Twitter" target="_blank"><img src="/images/icons/share/32/twitter.png" alt="Share on Twitter" title="Share on twitter"></a><!--Google +1 Button --><a href="https://plus.google.com/share?url=<?php echo urldecode($current_url); ?>" onclick="javascript:window.open(this.href, '_blank','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img src="/images/icons/share/32/google_plus.png" title="Share on Google+" alt="Share on Google+"/></a>    <!-- Reddit -->   <a href="http://reddit.com/submit?url=<?php echo $current_url; ?>&title=<?php echo urlencode($article_title); ?>" title="Share on Reddit" target="_blank"><img src="/images/icons/share/32/reddit.png" alt="Share on Reddit"/></a><!--Digg --><a href="http://www.digg.com/submit?phase=2&url=<?php echo $current_url; ?>" target="_blank"><img src="/images/icons/share/32/digg.png" alt="Share on Digg" title="Share on Digg"/></a><!--Tumblr--><a href="http://www.tumblr.com/share?v=3&u=<?php echo $current_url; ?>&t=<?php echo urlencode($title); ?>" target="_blank"><img src="/images/icons/share/32/tumblr.png" alt="Share on Tumblr" title="Share on Tumblr" /></a>       <!--Linkedln share--><a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $current_url; ?>&title=<?php echo $title; ?>&source=<?php echo $current_url; ?>" target="_blank"><img src="/images/icons/share/32/linkedin.png" title="Share on linkedln" /></a><!--Delicious share--><a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent('<?php echo $current_url; ?>')+'&title='+encodeURIComponent('<?php echo $title; ?>'),'delicious', 'toolbar=no,width=550,height=550'); return false;"><img src="/images/icons/share/32/delicious.png" alt="Delicious" title="Share on delicious" /></a>

If your have readers from China, you can also add below links:

<!--Sina Weibo --><a href="http://v.t.sina.com.cn/share/share.php?url=<?php echo $current_url; ?>&title=<?php echo urlencode($title); ?>" target="_blank"><img src="/images/icons/share/sina-weibo.png" title="Share on Weiboo" alt="Share on Weibo" /></a>

Above code is to share the link to the most famous Twitter like platform in China. This website provides more functions than Twitter. Learn from Twitter, better than Twitter.

<!-- QZone --><a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<?php echo $current_url; ?>&title=<?php echo urlencode($title); ?>" target="_blank"><img src="/images/icons/share/qzone.png" title="Share on QZone" alt="Share on QZone"/></a>

Above code is to share the link to the most widely used social platform in China.

!-- Renren --><a href="http://share.renren.com/share/buttonshare?link=<?php echo $current_url; ?>&title=<?php echo urlencode($title); ?>" target="_blank"><img src="/images/icons/share/renren.png" title="Share on Renren" alt="Share on Renren"/></a>

Above code is to share the link to the most notorious Facebook like platform in China. It steals almost every idea from Facebook. You may know how to use this website even
you don't know Chinese.

<!--Tencent Weibo --><a href="http://v.t.qq.com/share/share.php?url=<?php echo $current_url; ?>&title=<?php echo urlencode($title); ?>" target="_blank"><img src="/images/icons/share/tencent_weibo.png" title="Share on Tencent Weibo" alt="Share on Tencent Weibo"/></a>

Above code is to share the link to another Twitter like platform in China. Don't know why people need so many Twitters in China.

For all the above links, you need to modify the url and title accordingly. Also the images should be replaced with your own customized images, if you don't want to use images, you can use text instead. But then why do you want to customize them if you don't
want to use images.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.