1

我有 2 个应用程序:iOS 和 Android,

我有 WebView,在 WebView 中我呈现 Facebook 身份验证对话框,所以,当我按下登录按钮时 - 我看到,Android WebView 生成无效的 url:

安卓:

https://m.facebook.com/login.php?fbconnect=1&skip_api_login=1&m=m&next=https://m.facebook.com/dialog/permissions.request?_path=permissions.request&app_id=329216907114105&redirect_uri=http%3A%2F%2Fapi.quickblox.com%2Fauth%2Ffacebook%2Fcallback&display=touch&response_type=code&state=54b3e28cb55047afc2832cee42c16a748272b472.users.xml&perms=email&fbconnect=1&from_login=1&client_id=329216907114105&refsrc=http://m.facebook.com/login.php&app_id=329216907114105&cancel=http://api.quickblox.com/auth/facebook/callback?error_reason=user_denied&error=access_denied&error_description=The+user+denied+your+request.&state=54b3e28cb55047afc2832cee42c16a748272b472.users.xml&landing_serial=1&refid=9

IOS:

https://m.facebook.com/login.php?fbconnect=1&skip_api_login=1&m=m&next=https%3A%2F%2Fm.facebook.com%2Fdialog%2Fpermissions.request%3F_path%3Dpermissions.request%26app_id%3D329216907114105%26redirect_uri%3Dhttp%253A%252F%252Fapi.quickblox.com%252Fauth%252Ffacebook%252Fcallback%26display%3Dtouch%26response_type%3Dcode%26state%3Dbcd9407a04d875d9eb2c4e8c84364de06b2249d1.auth.xml%26perms%3Demail%26fbconnect%3D1%26from_login%3D1%26client_id%3D329216907114105&refsrc=http%3A%2F%2Fm.facebook.com%2Flogin.php&app_id=329216907114105&cancel=http%3A%2F%2Fapi.quickblox.com%2Fauth%2Ffacebook%2Fcallback%3Ferror_reason%3Duser_denied%26error%3Daccess_denied%26error_description%3DThe%2Buser%2Bdenied%2Byour%2Brequest.%26state%3Dbcd9407a04d875d9eb2c4e8c84364de06b2249d1.auth.xml&landing_serial=1&refid=9

所以 Android 没有将嵌套参数作为 URL 转义 - 我得到“发生错误。请稍后再试。

所以,我必须做的是,我希望 Android 生成正确的 url...

upd: 我在 WebView 回调 onPageStarted 中得到这个 url

4

0 回答 0