<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Facebook Cookbook &#187; Raquibul Islam</title>
	<atom:link href="http://fbcookbook.ofhas.in/author/rana/feed/" rel="self" type="application/rss+xml" />
	<link>http://fbcookbook.ofhas.in</link>
	<description>thousands of app development recipes</description>
	<lastBuildDate>Sun, 21 Mar 2010 10:38:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>how to successfully keep record of which friend is accepting your invitation</title>
		<link>http://fbcookbook.ofhas.in/2009/02/13/how-to-successfully-keep-record-of-which-friend-is-accepting-your-invitation/</link>
		<comments>http://fbcookbook.ofhas.in/2009/02/13/how-to-successfully-keep-record-of-which-friend-is-accepting-your-invitation/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 18:21:35 +0000</pubDate>
		<dc:creator>Raquibul Islam</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Invitation]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[tracking invitation]]></category>

		<guid isPermaLink="false">http://fbcookbook.ofhas.in/?p=197</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://fbcookbook.ofhas.in/2009/02/13/how-to-successfully-keep-record-of-which-friend-is-accepting-your-invitation/';
digg_bgcolor = '#FFFFFF';
digg_skin = '';
digg_window = '';
digg_title = 'how to successfully keep record of which friend is accepting your invitation';
digg_bodytext = '';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
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 &#38;next=&#8217;.urlencode(&#8217;?rid=&#8217;.$user).
have a look in side the content there is a php line which will show the choose [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://fbcookbook.ofhas.in/2009/02/13/how-to-successfully-keep-record-of-which-friend-is-accepting-your-invitation/';
digg_bgcolor = '#FFFFFF';
digg_skin = '';
digg_window = '';
digg_title = 'how to successfully keep record of which friend is accepting your invitation';
digg_bodytext = '';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>to keep record lets create a table named users .</p>
<p class="MsoNormal"><span class="syntaxpunctsyntaxpunctbracketcloseround">
<pre name="code" class="sql">

CREATE TABLE `friends` (
`uid` INT NOT NULL ,
`rid` INT NOT NULL ,
) ;
</pre>
<p></span></p>
<p>then you have to add a small code snippet in the invitation code.we just need to add &amp;next=&#8217;.urlencode(&#8217;?rid=&#8217;.$user).</p>
<p>have a look in side the content there is a php line which will show the choose with a url .<br />
just after adding the new code the url will look like</p>
<p class="MsoNormal"><span class="syntaxpunctsyntaxpunctbracketcloseround">
<pre name="code" class="php">

echo htmlentities(&#039;&lt;fb:req-choice url=&quot;http://www.facebook.com/add.php?api_key=&#039;.$appapikey.&#039;next=&#039;.urlencode(&#039;?rid=&#039;.$user).&#039;&quot; label=&quot;app name&quot; /&gt;&#039;);
</pre>
<p></span></p>
<p>now we have to change the setting of the application .and change the <strong>Post-Add Redirect URL</strong> like this</p>
<p style="text-align: center;">
<p><img class="size-full wp-image-112 alignnone" title="Facebook application setting" src="http://fbcookbook.ofhas.in/wp-content/uploads/2009/02/picture-7.png" alt="Facebook application setting" width="459" height="311" /></p>
<p>this is the <strong>install.php</strong></p>
<p><span class="syntaxpunctsyntaxpunctbracketcloseround">
<pre name="code" class="php">

include ‘config.php’;

//$url is ur desired location where u want to user to be redirected after installation (ie : invite page) ;
$url = &quot;http://apps.facebook.com/appname/invite.php&quot;;

mysql_query(“insert into users value (‘$user’,$_GET[‘rid’]);”);

$facebook-&gt;redirect($url);
?&gt;
</pre>
<p></span></p>
<p>how dose it works ? first we are sending the current user id in invitation page. and as we set the <strong>Post-Add Redirect URL</strong> to a page when any user install the application from the invitation he/she will be redirect to the <strong>install.php</strong> page and the first user who invited him/her will be passed to <strong>install.php</strong> page using HTTP GET method .they store those 2 user id as u want .</p>
]]></content:encoded>
			<wfw:commentRss>http://fbcookbook.ofhas.in/2009/02/13/how-to-successfully-keep-record-of-which-friend-is-accepting-your-invitation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
