Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To answer your questions </p> <p>1)What about cookies?</p> <p>You just add a parameter to the Facebook initialization. Change it to the following</p> <pre><code>$facebook = new Facebook(array( 'appId' =&gt; '...', 'secret' =&gt; '...', 'cookie' =&gt; true, )); </code></pre> <p>2)What is the bare minimum I need to get out of this example.php file to ....</p> <p>Not everything you want is in this example. The top half of the code shows you how to connect and validate a user. The second half just dumps out their basic details and naitik's details. For the rest you need to look further.</p> <p>3)In the src/ files, there is one 'file fb_ca_chain_bundle.crt,' </p> <p>The purpose of this file is to offer a workaround for CURL error 60. Read this:</p> <p><a href="http://www.takwing.idv.hk/blog/2011/php-sdk-demystified-%E2%80%93-how-curl-error-60-is-handled/" rel="noreferrer">http://www.takwing.idv.hk/blog/2011/php-sdk-demystified-%E2%80%93-how-curl-error-60-is-handled/</a></p> <p>4)The line $naitik = $facebook->api('/naitik'); is "naitik" the username of this person--so if I type facebook.com/naitik it will show his public profile? is replacing "/naitik" with "/me" what will get the public profile of the person logged into facebook?</p> <p>Exactly right</p> <p>5)How do I get the access token, and how do I use it in my code?</p> <p>$facebook->getAccessToken();</p> <p>You add it some of the method calls, but it is not necessary for everything.</p> <p>6)When I create a session for the user, and a cookie so that the user is logged in after reopening the browser, what should I exactly be storing in my sessions and cookies?</p> <p>The Facebook SDk is going to take care of that. You will just need to store whatever extra information about the user your App requires.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload