Pergunta

I have a problem of reauthorizating the publish stream after calling the initWithReadPermission when using FBLoginView. I try to call inside the delegate function where i can get the user information. After the next dialog asking for publish stream permission, the application threw me an exception saying

"'com.facebook.sdk:InvalidOperationException', reason: 'FBSession: It is not valid to reauthorize while a previous reauthorize call has not yet completed.' "

I need to call after the read permission but how to prevent this problem?

Foi útil?

Solução

According to your error the FBSession is not opened. so you should check if the session is

opened before trying to reauthorize.

Outras dicas

In the facebook sdk doc somewhere they state that you should not get read and write permission at the same time.

The best approach would be init with Read permission, and then as soon as the user does an action that require write permission, ask for it in a second time (which is what they want you to do actually, also because if you use iOS6 SSO, for read and write permission i think you need to click 2 different alert views, it cannot be done in 1 single authorization click)

if you really need to get both read and write in a sequence, try with a NSNotification when you successfully get the read authorization, and then try to get the write permission when you get that notification.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top