function fb_app_insert in Drupal for Facebook 5
Same name and namespace in other branches
- 5.2 fb_app.module \fb_app_insert()
File
- ./
fb_app.module, line 262 - Defines a custom node type that stores a facebook application configuration.
Code
function fb_app_insert($node) {
//drupal_set_message("fb_app_insert" . dpr($node,1));
$fb_app = (object) $node->fb_app;
$data = serialize($node->fb_app_data);
db_query("INSERT INTO {fb_app} (nid, label, apikey, secret, id, canvas, require_login, create_account, unique_account, data) VALUES (%d, '%s', '%s', '%s', '%s', '%s', %d, %d, %d, '%s')", $node->nid, $fb_app->label, $fb_app->apikey, $fb_app->secret, $fb_app->id, $fb_app->canvas, $fb_app->require_login, $fb_app->create_account, $fb_app->unique_account, $data);
_fb_app_blocks_update($node);
watchdog('fb_app', t('Created Facebook Application %label.', array(
'%label' => $fb_app->label,
)), WATCHDOG_NOTICE, l($node->title, 'node/' . $node->nid));
}