Nhúng mạng xã hội trong blog

Mạng xã hội ngày càng phổ biến trong cộng đồng mạng Việt Nam: các nút +, nút Like , Twiter ngày càng được các trang web quan tâm, nhưng blog chỉ có nút + trên tất cả các mẫu nhưng các nút còn lại thì không hỗ trợ hoặc có hỗ trợ thì có ít mẫu cho bạn lựa chọn. Trong bài viết lần này mình xin chia sẻ cụ thể nhất cách nhúng các trang mạng xã hội khác nhau vào blog của bạn:
Mạng xã hội trên blog
Có bốn bước để thực hiện xong công việc này:
(Các bạn có thể tham khảo 4 bước trong bài "Giao diện tuyết rơi cho blog" )
Công việc mà bạn cần thay đổi là nhúng copy đoạn code này vào là ok.

<!-- Nhúng mạng xã hội trong blog -->
<div id="social">
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=115109971990325";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://yeuhoadep.blogspot.com/" data-send="false" data-layout="box_count" data-width="450" data-show-faces="true" data-font="segoe ui"></div>
<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-size="tall" data-href="http://yeuhoadep.blogspot.com"></div>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
<a href="https://twitter.com/share" class="twitter-share-button" data-dnt="true" data-count="vertical" >Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div

Lúc này bạn bè có thể chia sẻ các bài viết của bạn lên mạng xã hội rồi đó:
Các bạn có thể tham khảo các ứng dụng hay cho blog tại đây: http://yeuhoadep.blogspot.com/search/label/th%E1%BB%A7%20thu%E1%BA%ADt

Chúc bạn thành công!!!!!

0 nhận xét:

Đăng nhận xét