function fb_app_update in Drupal for Facebook 5.2
Same name and namespace in other branches
- 5 fb_app.module \fb_app_update()
File
- ./
fb_app.module, line 363 - Defines a custom node type that stores a facebook application configuration.
Code
function fb_app_update($node) {
$fb_app = (object) $node->fb_app;
fb_app_get_app_properties($fb_app);
// Get canvas and possible other props
$fb_app->data = serialize($node->fb_app_data);
$fb_app->nid = $node->nid;
db_query("UPDATE {fb_app} SET label='%s', apikey='%s', secret='%s', id='%s', canvas='%s', require_login=%d, create_account=%d, unique_account=%d, data='%s' WHERE nid=%d", $fb_app->label, $fb_app->apikey, $fb_app->secret, $fb_app->id, $fb_app->canvas_name, $fb_app->require_login, $fb_app->create_account, $fb_app->unique_account, $fb_app->data, $node->nid);
fb_app_set_app_properties($fb_app);
// Set callback URL, etc.
}