The problem I encounter is, when I reset my simulator and run the project, at first everything is alright, that my login page is shown. When I pressed the login button,
it first asked me to login (NORMAL), and then authorize the app. However, when I pressed the Okay button (assume I've already authorized the app before), in the program fbDidLogin is called, yet another safari window is popped-up and is asking for authorization again ...

I've been searching for solutions and found this question which said one doesn't want to put the authorize method and feed dialog at the same place. Yet, in my code I didn't do such things (I did have app request dialog code but I'm quite sure they are not put at the same place).

Moreover, after I pressed the Okay button twice, it goes to the logged in page with error code 400.... and when I clicked another button for getting user's friends, it succeed.

The strange phenomenon is that, if I did get the user's friends and the logout and login again, the same code only pop up ONE safari window for authorization.....

So I have been quite confused, so anyone can help me?

EDIT

I just found out that, if I don't include permissions, the app runs fine, but if I include it, the problem is still there that Safari pops up for two times at the first time of logging in...