I am able to use this funciton to pop up the dialog. It works fine if the user hasn't granted any permission. After I granted the permission, I refresh the whole application page, the permission dialog show and disappear. Just after the dialog disappeared, it started to redirect to the home page www.facebook.com.
I have checked my setting and I found no problem? Does anyone have any ideas of what the problem is.