I\'m kinda new to this so bear with me. I\'ve installed a \"Login with Facebook\" button via the Javascript SDK, which works fine. I\'ve also set up the PHP code (facebook.php)
I happen to have a blog post and some previous answers that may be of use to you as reference points.
Have you registered your site on Facebook as an "application"? If not, you'll need to do that. The cookie which Facebook sets that allows your site to access a user's information (once they've agreed to give your "application" access) uses a combination of your application's ID and "secret" (a long alphanumeric string that you must not share, or other applications would be able to impersonate yours) to set an encrypted value with the user's ID and an authentication token unique to the user and your application (representing the permission they've given you to their data).
The cookie is posted to your site alongside requests like any other cookie. You'd use your application's secret to decrypt it and extract the user's ID and authentication token, which you would then use to access data via Facebook's graph API.