此问题是由于AbstractFacebook仅仅忽略了从Facebook API接收到的整个FBResult参数,包括用户拒绝授予应用访问权限时的“取消”参数。从AbstractFacebook
反编译OnAuthResponse方法是这样的:
protected void OnAuthResponse(FBResult result)
{
Dictionary<string, object> dictionary = new Dictionary<string, object>();
dictionary["is_logged_in"] = (object) (bool) (this.IsLoggedIn ? 1 : 0);
dictionary["user_id"] = (object) this.UserId;
dictionary["access_token"] = (object) this.AccessToken;
dictionary["access_token_expires_at"] = (object) this.AccessTokenExpiresAt;
FBResult result1 = new FBResult(Json.Serialize((object) dictionary), result.Error);
using (List<FacebookDelegate>.Enumerator enumerator = this.authDelegates.GetEnumerator())
{
while (enumerator.MoveNext())
{
FacebookDelegate current = enumerator.Current;
if (current != null)
current(result1);
}
}
this.authDelegates.Clear();
}
如果你能以某种方式覆盖此行为,也许你可以剥夺存储在result.message了“取消”参数的形式JSON。
感谢您的报告,我们正在调查此问题。 – benp