You are here

function fb_connect_nodeapi in Drupal for Facebook 5.2

File

./fb_connect.module, line 388
Support for Facebook Connect features

Code

function fb_connect_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  if (($op == 'insert' || $op == 'update') && $node->type == 'fb_app') {

    //dpm(func_get_args(), "fb_connect_nodeapi($op)"); // debug
    if ($node->fb_app_data['fb_connect']['primary']) {
      variable_set('fb_connect_primary_apikey', $node->fb_app['apikey']);
      drupal_set_message(t('!node is now the primary Facebook Connect application.', array(
        '!node' => l($node->title, 'node/' . $node->nid),
      )));
    }
  }
}