You are here

function fb_report_errors in Drupal for Facebook 5

Same name and namespace in other branches
  1. 5.2 fb.module \fb_report_errors()
  2. 6.2 fb.module \fb_report_errors()

Convenience method for displaying facebook api errors.

8 calls to fb_report_errors()
action_fb_set_profile_fbml in ./fb_actions.module
Implementation of an Action. See Actions module.
action_fb_set_ref_fbml in ./fb_actions.module
Implementation of an Action.
action_fb_write_minifeed in ./fb_actions.module
Implementation of an Action. See Actions module.
fb_actions_minifeed in ./fb_actions.module
fb_actions_profile_fbml in ./fb_actions.module

... See full list

File

./fb.module, line 574

Code

function fb_report_errors($fb = FB_APP_CURRENT) {
  if ($fb == FB_APP_CURRENT) {
    $fb = $GLOBALS['fb'];
  }
  if ($fb) {
    if ($fb->api_client->error_code) {
      $message = t('Facebook API error %code (see !link).', array(
        '%code' => $fb->api_client->error_code,
        '!link' => l(t('error codes'), "http://wiki.developers.facebook.com/index.php/Error_codes"),
      ));
      watchdog('fb', $message, WATCHDOG_ERROR);
      drupal_set_message($message, 'error');
    }
  }
}