You are here

function fb_user_menu in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 5 fb_user.module \fb_user_menu()
  2. 6.3 fb_user.module \fb_user_menu()
  3. 6.2 fb_user.module \fb_user_menu()
  4. 7.4 fb_user.module \fb_user_menu()

Implements hook_menu().

File

./fb_user.module, line 69
This module manages relations between local Drupal user accounts and their accounts on facebook.com.

Code

function fb_user_menu() {
  $items = array();

  // Admin pages
  $items[FB_PATH_ADMIN . '/fb_user'] = array(
    'title' => 'User Settings',
    'description' => 'Local account to facebook account mapping',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fb_user_admin_settings',
    ),
    'access arguments' => array(
      FB_PERM_ADMINISTER,
    ),
    'file' => 'fb_user.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );

  // Callback to visit a user page when their fbu is known but not their uid.  (i.e. from javascript)
  $items['fb_user/%fb_graph'] = array(
    'title' => 'My account',
    'title callback' => 'fb_user_page_title',
    'title arguments' => array(
      1,
    ),
    'page callback' => 'fb_user_view_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}