Updated for Facebook application