You are here

function fb_app_set_app_properties in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 6.3 fb_app.admin.inc \fb_app_set_app_properties()
  2. 6.2 fb_app.admin.inc \fb_app_set_app_properties()
  3. 7.3 fb_app.admin.inc \fb_app_set_app_properties()
2 calls to fb_app_set_app_properties()
fb_app_insert in ./fb_app.module
fb_app_update in ./fb_app.module

File

./fb_app.module, line 324
Defines a custom node type that stores a facebook application configuration.

Code

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