1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need : How to stop people from watching a video unless the press like button

Discussion in 'General Scripting Chat' started by mega_mind, Jul 2, 2012.

  1. mega_mind

    mega_mind Junior Member

    Joined:
    Jul 27, 2011
    Messages:
    111
    Likes Received:
    32
    I have been watching some sites use script that don't allow people to watch a video on their sites until the press like button like this site ( sorry the site isn't in English but you will understand )

    http://almoshakes.com/samer/viva/013.htm

    If anyone know the idea or the script , please tell me , Thanks in advance
     
  2. travisle

    travisle Junior Member

    Joined:
    Jul 31, 2011
    Messages:
    101
    Likes Received:
    58
    Occupation:
    Director of Marketing
    Location:
    ekwity.com
    If you are using wordpress you can search "Like Gate" in the plugins search section. This is for free and most people sell these plugins. That could save you anywhere from$10-$40.

    If you are not using wordpress search in google "Content Locker Script" or "Facebook Lock Script" "Like Lock" etc. You should see some helpful ones. I don't know if there are any for free without wordpress because I only use wordpress.

    You can also do the same thing with twitter.

    Hope this helps.
     
    • Thanks Thanks x 1
  3. DevSwift

    DevSwift Newbie

    Joined:
    Jul 5, 2012
    Messages:
    6
    Likes Received:
    1
    Location:
    Raleigh, NC (USA)
    Home Page:
    Built one of these myself here recently. FB Javascript SDK provides an event listener for Like buttons. So what I did, created a div with a fake player image. When the user click, I pulled up a CSS dialog over the div with the Like button. Wrote a function for the event listener to close dialog and change innerHTML of div to YouTube video.
     
  4. nnann

    nnann Registered Member

    Joined:
    Dec 13, 2010
    Messages:
    70
    Likes Received:
    17
    If you don't know much about javascript I'd go Travisle's route.

    Otherwise here is a link to the facebook documentation that DevSwift mentioned: developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/