Added sojer's changes to the share AJAX interface