문제

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?

도움이 되었습니까?

해결책

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

opened before trying to reauthorize.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top