How do I make content lock that forces visitor to like my facebook page?

Discussion in 'HTML & Website Design' started by drunkglitch, Mar 31, 2013.

  1. #1
    Does anyone know how I can content lock my website so to read the information the visitor must like my facebook page first?
    Thanks in advance for the advice / help!
     
    Solved! View solution.
    drunkglitch, Mar 31, 2013 IP
  2. rolodex

    rolodex Well-Known Member

    Messages:
    364
    Likes Received:
    37
    Best Answers:
    5
    Trophy Points:
    175
    #2
    Your website must check the user's Facebook, which must request for permission from the user. Then you have to dig into Facebook API and link it with your website, which has a script to grant the user's access to your content.

    It's a hell of a work.
     
    rolodex, Mar 31, 2013 IP
  3. joshwebguy

    joshwebguy Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    61
    #3
    If you are using Wordpress, there are several plugins that do this for you. Here is one of them: http://wordpress.org/extend/plugins/like-gate/
     
    joshwebguy, Mar 31, 2013 IP
  4. rolodex

    rolodex Well-Known Member

    Messages:
    364
    Likes Received:
    37
    Best Answers:
    5
    Trophy Points:
    175
    #4

    Almost there. Now how do you do it for Facebook pages?
     
    rolodex, Mar 31, 2013 IP
  5. joshwebguy

    joshwebguy Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    61
    #5
    Good question. I just checked and the Pro version has that feature built right in: http://club.orbisius.com/products/wordpress-plugins/like-gate-pro/

    If you are looking for a free solution, I'm sure it wouldn't be terribly difficult to jump in the PHP for the plugin and swap out the dynamic URL it is placing in favor for your Facebook page URL.
     
    Last edited: Mar 31, 2013
    joshwebguy, Mar 31, 2013 IP
  6. #6
    I just gave the plugin code a look and found where you would edit it. In the code below in "like-gate.php" on line 461 you would change "$post_url" to the URL of your Facebook page.

    <div class='like_gate_like_container' post_url="$post_url" post_id='{$post->ID}'>
            <fb:like href="$post_url" layout="standard" show-faces="false" width="450" action="like" colorscheme="light"></fb:like>
    </div>
    HTML:
    For example, you could change it to:

    <div class='like_gate_like_container' post_url="$post_url" post_id='{$post->ID}'>
            <fb:like href="https://www.facebook.com/RockPaperSimple" layout="standard" show-faces="false" width="450" action="like" colorscheme="light"></fb:like>
    </div>
    HTML:
     
    Last edited: Mar 31, 2013
    joshwebguy, Mar 31, 2013 IP
  7. rolodex

    rolodex Well-Known Member

    Messages:
    364
    Likes Received:
    37
    Best Answers:
    5
    Trophy Points:
    175
    #7


    Great work, Josh.

    Hopefully this'll answer OP's question. Go and give it a try.

    Good luck!
     
    rolodex, Mar 31, 2013 IP