Breaking News
Loading...
Friday, 18 March 2016

How To Add Facebook Like Button on Downloading Link | Blogger Tips 2016

How To Add Facebook Like Button on Downloading Link | Blogger Tips 2016


tips4tricx
Hi Friends,
Some times when a web admin and a blogger upload some king of premium content on web to download free than he expect some thing in return, its not about money it all about social payment like facebook like, tweeter follow, google + add etc etc. So today I will tell you a trick with this you can lock your premium content like pdf files, songs, games means any thing.
So now put a lock of Facebook like, tweet or +1 google plus on any downloadable content. I think this a best return gift for web admin.
How To Add Lock on Premium Content:
For this just put a simple HTML code in website. Just make simple change in line number 13, 56, 61 and 65. Put you website links here.
  1.   <html xmlns:fb=”http://ogp.me/ns/fb#”>
  2.     <head>
  3.         <title>Pay with a Tweet, Facebook Like or Google +1</title>
  4.         /*  Social Payments by tips4tricx    */
  5.         /*  You are free to use, modify or republish this code  */
  6.     </head>
  7.     <body>
  8.     <div id=”fb-root”></div>
  9.     <script type=”text/javascript”>
  10.  
  11.         function technoclues() {
  12.           // The file URL that visitors can download after their Like/tweet/+1
  13.           var url = “http://www.bloggertips2016.blogspot.com/”;  
  14.           url = “<a href='” + url + “‘>Click here</a> to download the file.”;
  15.           document.getElementById(“restricted”).innerHTML = url;
  16.         }
  17.  
  18.         window.fbAsyncInit = function() {
  19.           FB.init({ status : true, cookie : true, xfbml  : true });
  20.           FB.Event.subscribe(‘edge.create’, function(response) { technoclues(); });
  21.         };
  22.  
  23.         (function(d, s, id) {
  24.           var js, fjs = d.getElementsByTagName(s)[0];
  25.           if (d.getElementById(id)) return;
  26.           js = d.createElement(s); js.id = id;
  27.           js.src = “//connect.facebook.net/en_US/all.js”;
  28.           fjs.parentNode.insertBefore(js, fjs);
  29.         }(document, ‘script’, ‘facebook-jssdk’));
  30.  
  31.         window.twttr = (function (d,s,id) {
  32.           var t, js, fjs = d.getElementsByTagName(s)[0];
  33.           if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
  34.           js.src=”//platform.twitter.com/widgets.js”; 
  35.           fjs.parentNode.insertBefore(js, fjs);
  36.           return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
  37.         }(document, “script”, “twitter-wjs”));
  38.  
  39.         twttr.ready(function (twttr) {
  40.           twttr.events.bind(‘tweet’, function(event) {
  41.             technoclues();
  42.           });
  43.         });
  44.  
  45.         (function() {
  46.           var po = document.createElement(‘script’); 
  47.           po.type = ‘text/javascript'; po.async = true;
  48.           po.src = ‘https://apis.google.com/js/plusone.js';
  49.           var s = document.getElementsByTagName(‘script’)[0]; 
  50.           s.parentNode.insertBefore(po, s);
  51.         })();
  52.     </script>
  53.  
  54.      <div id=”restricted”>
  55.  
  56.       // twitter.com/tipsandtricx    
  57.       <a href=”https://twitter.com/share”                                       
  58.           data-text=”http://www.bloggertips2016.blogspot.com/ is best blog for technical stuff” 
  59.           data-via=”tips4tricx” class=”twitter-share-button” data-lang=”en”></a>
  60.  
  61.       // The URL of the page that visitor need to +1 on Google Plus
  62.       <g:plusone size=”medium” callback=”manshahmohsin”
  63.           href=”http://www.bloggertips2016.blogspot.com/.com/”></g:plusone>
  64.  
  65.       // The full URL of your Facebook Page goes here
  66.       <fb:like href=”http://www.facebook.com/manshah.mohsin” send=”false” 
  67.           layout=”button_count” width=”220″ show_faces=”false”></fb:like>
  68.  
  69.      </div>
  70.     </body>
  71.   </html>
Whenever user click on link, a JavaScript will run it will show links instead of downloading button. So I think you now can do it yourself.

0 comments:

Post a Comment

 
Toggle Footer