title: Facebook API Registration
body: <p>1)If two users(A &amp; B) logs into the website(http://site.com). Both(A &amp; B) have registered in the website with normal user registration (not FB register). Both(A &amp; B) will have access to all parts of the site with all user provisions.They can write their reviews in the website and can do so and so.This is happening right now.</p>
  
  <p>Note:Let us assume the users A and B are already friends in the Facebook.But they don't know each other in our website.</p>
  
  <p>2)If two users(X &amp; Y) logs into the website. Both(X &amp; Y) have registered in the website with facebook registration. Both(X &amp; Y) will have access to all parts of the site with all user provisions.They can write their reviews in the website and can do so and so.This is happening right now.</p>
  
  <p>Note:Let us assume the users X and Y are already friends in the Facebook.But they don't know each other in our website.</p>
  
  <p>What i am  going to do:</p>
  
  <p>a)If the user A logs into the system, we need to show facebook login button in some page to link his facebook account. If he wish to link , he need to give his FB login details,then we need to show the friends of him who are all also the users of my website. He may have so many friends with his facebook account, but in this part we need to show B details because he is already user of the site and also his facebook friend as we stated above.</p>
  
  <p>If the user A has someother facebook friends(D,E,F) who are also registered users in our site  then we will need to show all of those user details with their  recent activity in the website under his FB linking page. </p>
  
  <p>2)This is the samething need to do for FB registered users(X,Y) also.(Similar to <a href="http://runkeeper.com" rel="nofollow">http://runkeeper.com</a>)</p>
  
  <p>Technical Agenda:</p>
  
  <p>1)First type of user(A,B):</p>
  
  <pre><code>   During the linking of facebook(facebook login), we are going to update the user table row values with his facebook details and then we need to show his FB friends activity in the website by using the FB session data  created for his/her FB login and now i will be able to show his Friendslist. 
  </code></pre>
  
  <p>Problem:</p>
  
  <p>The same user(A or B) logout from the website and relogin with his user login details. In the user table we already having his facebook id details, using that we need to show all of his FB friends. The Facebook api uses the Session value to show the datas with the api call like $frnd=$facebook->api('/me').Now there is no session for this user.</p>
  
  <pre><code>Please suggest me anyway to come up with this technical part , because there is no clear documentation to follow .
  </code></pre>
  
  <p>2)Second type of user(X,Y):</p>
  
  <pre><code>    They are going to login with the existing FB details to the site, we need to just show there FB friend activity in the website.
  </code></pre>