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

Force Add Before Unlocking Content

Discussion in 'FaceBook' started by Josh-Emm, Oct 5, 2011.

  1. Josh-Emm

    Josh-Emm Registered Member

    Joined:
    Apr 12, 2011
    Messages:
    57
    Likes Received:
    9
    Hello and welcome to my first tut on this forum

    I am going to show you a very nice feature which has not been taken advantage of yet.

    I worked out how to do this myself needed some help with codes but :)

    This is all done through a link like this
    https://www.facebook.com/dialog/fri...redirect_uri=http://m-s-n.hostzi.com/friends/

    First off create a index.php file and put this code in it
    PHP:
    <?php if (isset($_GET['action'])) {
        
    $page htmlentities($_GET['action']);
        switch(
    $page) {

            case 
    '1': include('1.php'); // or just use header
            
    break;

            case 
    '0': include('0.php'); // or just use header
            
    break;

        }
    }    else {
    include 
    'other.php';
    ?>
    then create files called "0.php" "1.php" & "other.php"

    they are took to 0.php if they press cancel so make this page say something like "you pressed cancel you must press add to unlock"

    and 1.php if they add the user so make this the unlockable content

    and other.php if from none so make this something like a redirect to the add url

    upload these files into a host then create a Facebook app and make it the same domain

    PHP:
    https://www.facebook.com/dialog/friends/?id= ID OF USER TO ADD &app_id= THE APP ID OFF THE APP YOU JUST MADE&redirect_uri= THE DOMAIN YOU USED TO UPLOAD THE FILES ON
    Edit the above url with your details and you are ready to go :)

    this can be used on pages as an extra step to virals etc you can even charge buisnesses to have there profile on it

    if anyone needs any help setting up i will be glad to help.




     
    • Thanks Thanks x 2
    Last edited: Oct 5, 2011
  2. john klyne

    john klyne Newbie

    Joined:
    Sep 24, 2011
    Messages:
    34
    Likes Received:
    10
    seems good to me. nice totorial, was simple and works.
     
  3. Josh-Emm

    Josh-Emm Registered Member

    Joined:
    Apr 12, 2011
    Messages:
    57
    Likes Received:
    9
    thanks for leaving some feedback :)

    anyone having trouble setting up i will help :)
     
  4. mcDeviLL

    mcDeviLL Newbie

    Joined:
    Oct 13, 2011
    Messages:
    3
    Likes Received:
    3
    good thoughts, nice post, handy stuff.
     
  5. xashishx

    xashishx Regular Member

    Joined:
    Jan 30, 2011
    Messages:
    420
    Likes Received:
    125
    Occupation:
    Internet Marketer
    Location:
    India
    Good post!
     
  6. viralx

    viralx Newbie

    Joined:
    Oct 16, 2011
    Messages:
    21
    Likes Received:
    0
    thats some thing new .... thanks a lot mate im happy i joined this forum :)
     
  7. wpbacklinks

    wpbacklinks Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 27, 2010
    Messages:
    3,396
    Likes Received:
    1,339
    Gender:
    Male
    Occupation:
    Affiliate Marketer
    Location:
    Everywhere
    Who is Peter Tobin? :D

    nice script.
     
  8. Josh-Emm

    Josh-Emm Registered Member

    Joined:
    Apr 12, 2011
    Messages:
    57
    Likes Received:
    9
    peter tobin is a peadophile so i just used that name for an example :))