In the documentation, you set your app token information when initializing the $facebook.
require_once("facebook.php");
$config = array();
$config[‘appId’] = 'YOUR_APP_ID';
$config[‘secret’] = 'YOUR_APP_SECRET';
$config[‘fileUpload’] = false; // optional
$facebook = new Facebook($config);
Here's a link to the details: PHP SDK Overview
If you need permission to certain parts of their Facebook account, that doesn't come with the default, say you want to look at their friends for example or post on their wall, you can request that permission through the login.
$params = array(
scope => 'read_stream, friends_likes',
redirect_uri => 'https://www.myapp.com/post_login_page'
);
$loginUrl = $facebook->getLoginUrl($params);
The scope comes from the permissions page. This is just a comma delimited list of permissions your app would like. The redirect_uri is a url on your page that Facebook will return to so you can capture the authenticated tokens and verification.