You are here

function fb_debug_token in Drupal for Facebook 7.4

File

./fb.module, line 398

Code

function fb_debug_token($token, $fb_app = array()) {
  if (empty($token)) {
    return;
  }
  if (empty($fb_app)) {
    $data = fb_graph('app', $token);
    $fb_app = fb_application_load($data['id']);
  }
  $app_token = fb_token_load($fb_app['client_id']);
  $graph = fb_graph('debug_token', array(
    'input_token' => $token,
    'access_token' => $app_token['access_token'],
  ));
  return $graph['data'];
}