# Get Access Token From Page Tab Example
This example covers obtaining an access token and signed request from within the context of a page tab with the Facebook SDK for PHP.
## Example {#example}
Page tabs behave much like the app canvas. The PHP SDK provides a helper for page tabs that delivers specific methods unique to page tabs.
~~~~
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.2',
]);
$helper = $fb->getPageTabHelper();
try {
$accessToken = $helper->getAccessToken();
} catch(Facebook\Exceptions\FacebookResponseException $e) {
// When Graph returns an error
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
// When validation fails or other local issues
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
if (! isset($accessToken)) {
echo 'No OAuth data could be obtained from the signed request. User has not authorized your app yet.';
exit;
}
// Logged in
echo 'Page ID
';
var_dump($helper->getPageId());
echo 'User is admin of page
';
var_dump($helper->isAdmin());
echo 'Signed Request
';
var_dump($helper->getSignedRequest());
echo 'Access Token
';
var_dump($accessToken->getValue());
~~~~