You are here

function fb_devel_fb_tab in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 7.3 fb_devel.module \fb_devel_fb_tab()

File

./fb_devel.module, line 799
Makes development with Drupal for Facebook much easier. Keep this module enabled until you're confident your app works perfectly.

Code

function fb_devel_fb_tab($op, $data, &$return) {

  // debug.
  $data2 = $data;
  $data2['fb_app']->secret = t('Secret not shown.');

  // hide secret in debug output.
  if (fb_verbose() === 'extreme') {
    $return['fb_devel'] = array(
      '#type' => 'markup',
      '#value' => __FUNCTION__ . ':' . print_r($data2, 1),
      '#prefix' => '<pre>',
      '#suffix' => '</pre>',
      '#weight' => 99,
    );
    if ($data['profile_id'] && isset($data['fb'])) {
      $return['fb_devel']['signed_request'] = array(
        '#type' => 'markup',
        '#value' => __FUNCTION__ . ' signed request:' . print_r($data['fb']
          ->getSignedRequest(), 1),
        '#prefix' => '<pre>',
        '#suffix' => '</pre>',
        '#weight' => 99,
      );
      $return['fb_devel']['profile_id'] = array(
        '#type' => 'markup',
        '#value' => __FUNCTION__ . ':' . print_r($data['fb']
          ->api($data['profile_id']), 1),
        '#prefix' => '<pre>',
        '#suffix' => '</pre>',
        '#weight' => 99,
      );
    }
  }
}