How To Add Facebook Like Button on Downloading Link | Blogger Tips 2016
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.
- <html xmlns:fb=”http://ogp.me/ns/fb#”>
- <head>
- <title>Pay with a Tweet, Facebook Like or Google +1</title>
- /* Social Payments by tips4tricx */
- /* You are free to use, modify or republish this code */
- </head>
- <body>
- <div id=”fb-root”></div>
- <script type=”text/javascript”>
- function technoclues() {
- // The file URL that visitors can download after their Like/tweet/+1
- var url = “http://www.bloggertips2016.blogspot.com/”;
- url = “<a href='” + url + “‘>Click here</a> to download the file.”;
- document.getElementById(“restricted”).innerHTML = url;
- }
- window.fbAsyncInit = function() {
- FB.init({ status : true, cookie : true, xfbml : true });
- FB.Event.subscribe(‘edge.create’, function(response) { technoclues(); });
- };
- (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”;
- fjs.parentNode.insertBefore(js, fjs);
- }(document, ‘script’, ‘facebook-jssdk’));
- window.twttr = (function (d,s,id) {
- var t, js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
- js.src=”//platform.twitter.com/widgets.js”;
- fjs.parentNode.insertBefore(js, fjs);
- return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
- }(document, “script”, “twitter-wjs”));
- twttr.ready(function (twttr) {
- twttr.events.bind(‘tweet’, function(event) {
- technoclues();
- });
- });
- (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>
- <div id=”restricted”>
- // twitter.com/tipsandtricx
- <a href=”https://twitter.com/share”
- data-text=”http://www.bloggertips2016.blogspot.com/ is best blog for technical stuff”
- data-via=”tips4tricx” class=”twitter-share-button” data-lang=”en”></a>
- // The URL of the page that visitor need to +1 on Google Plus
- <g:plusone size=”medium” callback=”manshahmohsin”
- href=”http://www.bloggertips2016.blogspot.com/.com/”></g:plusone>
- // The full URL of your Facebook Page goes here
- <fb:like href=”http://www.facebook.com/manshah.mohsin” send=”false”
- layout=”button_count” width=”220″ show_faces=”false”></fb:like>
- </div>
- </body>
- </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