The most important role in a Web/Blog not only rely on a quality post, an important role also can not be avoided by social networks like Facebook, Twitter, Google Plus in building a Web/Blog.
Installation code for Facebook Like button, Plus Google and Twitter, which have been many circulating on the Blogger tutorial turns out will result in a large number of errors in the validation of HTML5 mainly on the postings we normally install.
But how to download the Validnya also easy, we just add "expr:data-href='data:post.url". on social networking.
For Google Plus
<div class='g-plusone' data-count='true' data-size='medium' expr:data-href='data:post.url'/> <script type='text/javascript'> window.___gcfg = {lang: 'id'}; (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>For Twitter
<a class='twitter-share-button' data-count='horizontal' data-related='' data-via='' expr:data-text='data:post.title' expr:data-url='data:post.url' href='http://twitter.com/share'>Tweet</a> <script src='http://platform.twitter.com/widgets.js' type='text/javascript'/>For Facebook Like
<div class='fb-like' data-layout='button_count' data-send='false' data-show-faces='false' data-width='90' expr:data-href='data:post.url'/>For Facebook Like please add this javascript in </body>, ignore this way if your blog is already install Javascript.
<div id='fb-root'/> <script>//<![CDATA[ (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/id_ID/all.js#xfbml=1&appId=352634211479923"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); //]]> </script>
No comments:
Post a Comment