function fb_feed_menu in Drupal for Facebook 5.2
File
- ./
fb_feed.module, line 19 - Helpers for Facebook feeds (http://wiki.developers.facebook.com/index.php/New_Design_Feed_Wall)
Code
function fb_feed_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'fb_feed/register',
'title' => t('Register template'),
'type' => MENU_CALLBACK,
'access' => user_access('administer fb apps'),
'callback' => 'fb_feed_register_cb',
);
$items[] = array(
'path' => 'fb_feed/deactivate',
'title' => t('Deactivate template'),
'type' => MENU_CALLBACK,
'access' => user_access('administer fb apps'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'fb_feed_deactivate_confirm',
),
);
}
else {
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
if ($node->type == 'fb_app') {
$fb_app_data = fb_app_get_data($node->fb_app);
$items[] = array(
'path' => "node/{$node->nid}/fb_feed/templates",
'title' => t('Feed Templates'),
'type' => MENU_LOCAL_TASK,
'access' => node_access('update', $node),
'callback' => 'fb_feed_template_page',
'callback arguments' => array(
$node->nid,
),
);
}
}
}
return $items;
}