我有一些连接Facebook的代码:
facebook.authorize(((Activity) ctx).getParent(), new String[] {},
requestCode, new DialogListener() {}
通常它工作正常。但有时我连接到一些网络不允许连接到Facebook。然后authorize方法将抛出
com.facebook.android.DialogError: The connection to the server was unsuccessful
在我的手机上,大约需要20秒才能抛出异常。但在其他一些设备上,花了很长时间(可能是因为不同设备上的设置不同,我不确定)。当网络不允许连接到Facebook时,有没有办法设置超时。