how to successfully keep record of which friend is accepting your invitation
to keep record lets create a table named users .
CREATE TABLE `friends` (
`uid` INT NOT NULL ,
`rid` INT NOT NULL ,
) ;
then you have to add a small code snippet in the invitation code.we just need to add &next=’.urlencode(’?rid=’.$user).
have a look in side the content there is a php line which will show the choose with a url .
just after adding the new code the url will look like
echo htmlentities('<fb:req-choice url="http://www.facebook.com/add.php?api_key='.$appapikey.'next='.urlencode('?rid='.$user).'" label="app name" />');
now we have to change the setting of the application .and change the Post-Add Redirect URL like this

this is the install.php
include ‘config.php’;
//$url is ur desired location where u want to user to be redirected after installation (ie : invite page) ;
$url = "http://apps.facebook.com/appname/invite.php";
mysql_query(“insert into users value (‘$user’,$_GET[‘rid’]);”);
$facebook->redirect($url);
?>
how dose it works ? first we are sending the current user id in invitation page. and as we set the Post-Add Redirect URL to a page when any user install the application from the invitation he/she will be redirect to the install.php page and the first user who invited him/her will be passed to install.php page using HTTP GET method .they store those 2 user id as u want .
One Response to “how to successfully keep record of which friend is accepting your invitation”
Leave a Reply



























Ben on March 5th, 2009
Thanks for this quick yet very useful tip