hook_menu() not available for ajax loaded links
You need to add 'access callback' =&gt; TRUE, to your menu item.

Your menu callback should look like the following:

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

  $items['favorite/%'] = array(
    'title' =&gt; 'favorite item',
    'page callback' =&gt; 'favorite_item',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_CALLBACK,
  );

  return $items;
}