Force Add Before Unlocking Content

Josh-Emm

Registered Member
Joined
Apr 12, 2011
Messages
61
Reaction score
13
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.




 
Last edited:
thats some thing new .... thanks a lot mate im happy i joined this forum :)
 
Back
Top