3

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?

2 Answers 2

1

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

opened before trying to reauthorize.

2
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.