Facebook SDK:FBLoginView重新授权以发布流

Facebook SDK:FBLoginView重新授权以发布流

问题描述:

使用FBLoginView时,调用initWithReadPermission后,我需要重新授权发布流.我尝试在委托函数内部调用,以获取用户信息.在下一个对话框要求发布流权限之后,该应用程序向我抛出了一个异常,内容为

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',原因:"FBSession:在先前的重新授权调用尚未完成的情况下,重新授权无效." "

我需要在获得读取权限后致电,但是如何防止出现此问题?

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

根据您的错误FBSession未打开.因此,您应该检查会话是否为

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

在尝试重新授权之前已打开.

opened before trying to reauthorize.