Need facebook like button content locker

Discussion in 'FaceBook' started by deepaklost, Nov 9, 2011.

  1. deepaklost

    deepaklost Newbie

    Joined:
    May 8, 2011
    Messages:
    3
    Likes Received:
    0
    Gender:
    Male
    Occupation:
    Doctor
    Location:
    India
    there is a script for web pages, where users have to click like button to see the content behind the semi transparent screen.those who have already clicked like wont be blocked again. i found many but its not working with my yola site. i need perfect script which works for yolasite. pls help me with that... am noob at html works... so pls copy paste what i have to paste. ill change my fan page links n other....

    thanks in advance
     
  2. Fuggz

    Fuggz Power Member

    Joined:
    Mar 25, 2010
    Messages:
    582
    Likes Received:
    603
    This is a typical like button content locker, just change out AppID and the page to redirect to, or add any javascript you want to execute after function next_page.

    If you want one that will detect if a user has already liked the page to not block content again, just do a quick search for "like to reveal" there are plenty of those around.

    Code:
    <script type="text/javascript">   function next_page() {         window.location = "http://yoursite.com/afterlike.html"; }      </script>   <script type="text/javascript">           window.fbAsyncInit = function() {         FB.init({appId: 'Your app ID', status: true, cookie: true, xfbml: true});         FB.Event.subscribe('edge.create',       function (response) {          next_page();       });            };       (function() {         var e = document.createElement('script');         e.async = true;         e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';         document.getElementById('fb-root').appendChild(e);       }());      </script>     </head>     <body>  </body>
     
  3. jaerehan

    jaerehan Elite Member

    Joined:
    Sep 25, 2009
    Messages:
    1,500
    Likes Received:
    1,504
    Occupation:
    Time...Time is on my side..
    Location:
    EU
    You might want the script from codecanyon:

    Code:
    http://codecanyon.net/item/social-traffic-pop/364259
    
    http://codecanyon.net/item/facebook-traffic-pop/142429