You are here

function fb_app_validate in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 5 fb_app.module \fb_app_validate()

File

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

Code

function fb_app_validate($node) {

  // TODO: check label is unique, and role name will be unique.
  // check apikey is unique, canvas page is unique
  $fb_app = (object) $node->fb_app;
  fb_app_get_app_properties($fb_app);
  if (!$fb_app->application_name) {
    form_set_error('fb_app][apikey', t('Unable to get application properties.  Confirm both apikey and secret.'));
  }
}