You are here

function fb_admin_set_app_properties in Drupal for Facebook 6.2

File

./fb.admin.inc, line 174
Admin pages and forms for Drupal for Facebook.

Code

function fb_admin_set_app_properties($fb_app) {
  $fb_app_data = fb_get_app_data($fb_app);
  if ($fb_app_data['fb_app']['set_app_props']) {
    $props = fb_invoke(FB_ADMIN_OP_SET_PROPERTIES, array(
      'fb_app' => $fb_app,
    ), array(), FB_ADMIN_HOOK);
    if (count($props)) {
      if ($fb = fb_api_init($fb_app, FB_FBU_CURRENT)) {
        try {
          $fb->api_client
            ->admin_setAppProperties($props);
        } catch (Exception $e) {
          fb_log_exception($e, t('Failed to set application properties on Facebook'));
        }
      }
    }
  }
}