Shubham Kumar

Hey, I am Shubham and i love Blogging, Coding and exploring new things and obviously sharing my experience with you.

60 Responses

  1. Tweet Share and Facebook Share counter doesn’t work. Please check it and let me know.

  2. jeff says:

    great script. Was wondering how to get cookie feature to work. Im using the latest script from git, but locker still shows on page after refresh or if you leave and come back. The cookie is set to 30 days, but just doesnt seem to work

  3. happyjjd says:

    Great script – works great. Was wondering if there is a way to delay the content from locking for a few seconds to allow person time to add comment on FB or G+?

  4. Madhusudan says:

    i have tried using your plugin to hide right side widget content, but what happens is when cliking on like or share buttons, another page opens with filled up data with share button, and wether I share or not the main content is already visible.
    is there a way that instead of opening in separate page it opens in the same div where content is so that unless i share i cant see the content behind it.

  5. SRah says:

    Hello, I added this successfully but it’s not working except Facebook share. Could you check here

  6. John says:

    Hi Shubham,

    first of all: thanks for this great piece of code! But unfortunately it does not work on my site. I created a Facebook App and put the ID in the Code. I changed the URL to the Site URL and the Facebook URL to my Facebook Page. Do you have any idea why it does not show the like button? It only links to my FB Page. If I press the Share Button nothing seems to happen.

  7. Odebright says:

    Hi, am Odebright from Odiramini.Please does it work for blogspot?

  8. Andrea says:

    Hi, I have a problem. If I view the page locked, and I put before the Likes on Facebook, the page is not show. It is possible to display the page in this case?

  9. Megaplex21 says:

    are it’s working with media player? i want people share before they can streaming media on my website

  10. Phuongvi says:

    Im download it. i have tried but it is not working. Can you help me?

  11. Andrew says:

    Great Thanks for your work. Nice code.
    1. Do you have a plan to add cookie support? And how resolve twitter count problem?

  12. Karl says:

    Hi Kumar,

    I only want to use facebook like & share.

    User must do both before accessing the content.

    What do i need to change?


    • Hi Karl,

      You need to initialise the code two times with the buttons you want:

      For Example:


      <div class="lock mct_shareit_locker">
      <div class="lock1 mct_shareit_locker">
      I Have to Lock this content


      var options = {
      var options1 = {

      Best Regards,

      P.S- Don’t do this because it’s annoying for users.

  13. Sergio says:

    It doesn’t work properly, if you click with the right button on twitter, It unlocks the text.

    • Hi Sergio,

      If you are using twitter button to unlock the content, then it will unlock only when you either tweet or follow/followed the content/owner.

      Please try again, and if you found then bug, then please comment.

      I will try to fix on my end.


  14. cuong says:

    hello, please hello,
    how to install in on blogger? and you can lock content open for youtube subscriber.
    hihi. sorry my english not good.

  15. Mil says:

    Wow that worked!!! you are simply awesome man.

  16. fasm00756 says:

    is it possible to show locker every time visitor refreshes the page
    and is it possible that if we do not define which url to like…. then shared url by default become the page or post on which locker is applied

    • Yes, and it’s do the same.

      • fasm says:

        no it seems like user will like only the url identified over here

        var options = {

                title: “Share/Like/Follow to Download”, //Heading of Content Locker

                text: ‘Choose Any Social Social Network from below to share our content and Download it.’, //Subheading of Content Locker


                    url: window.location.href,  //Your Content Page Url

                    pageId: “”,  //Your Facebook Page Url

                    appId: 676027382527018  //Your Facebook App ID



                    via: ‘mycodingtricks’, //Twitter Username

                    url: window.location.href,

                    text: document.title



                    apikey: ‘AIzaSyD_H_TgxVsG0jMy6dMTKjkhHilxIk_bQBk’, //Google App API key

                    url: window.location.href,



                    url: window.location.href


                buttons:[“facebook_share”, “facebook_like”, “twitter_tweet”, “twitter_follow”, “googleplus”, “linkedin”]




  17. Ricardo Pereira says:

    Exists any way to hide the content locker if the user already like or follow?

  18. dee says:

    how can i add it to my zoho side ….its not allow to edit html code …..

  19. Dear Shubham Kumar

    Thank you very much for this nice script. I have found some bug about twitter follow. The counter display a wrong number.
    I have 3.2K followers but your script display only 320, Please kindly suggestion how to fix it.

    Best Regards

  20. Don’t Forget to add mct_shareit_locker class to your HTML Element.
    And how to do it, which file, I have a site on WordPress

    • Add the mct_shareit_locker to that element which you want to lock with shareIt.js .

      For Example you want to lock an element having an ID mylocker, then your html code should look like:

      <div id="mylocker" class="mct_shareit_locker">
      <!--Your Content Goes Here -->

      Now add the jQuery code to lock the element.

      • Johny says:

        I tried everything but it is not working on my wordpress site i simply created a shortcode to use it to hide specific content but it is only hiding content as per the class mct_shareit_locker for which CSS property is display none other than that nothing is happening. It is not showing content locker box. I thought it is a wordpress plugin which can be used as alternative to One-Press Social Locker as said but realized it is a javascript plugin for HTML files. Will you please share how can i implement it in wordpress using shortcode.

Leave a Reply

Your email address will not be published. Required fields are marked *