我有一个android应用程序,其中有webview通过Instagram执行社交登录。当我尝试加载以下url:"https://api.instagram.com/oauth/authorize/?client_id=ba231a873ea145af9f97866de4718fe6&redirect_uri=https://instagram.com/&response_type=token&display=touch&scope=public_content“时,会出现一些铬错误。我知道,当我尝试通过普通浏览器加载相同的url时,它工作得很好。
I/chromium: [INFO:CONSOLE(0)] "The Content-Security-Policy directive 'worker-src' is implemented behind a flag which is currently disabled.
", source: https://www.instagram.com/accounts/login/?force_authentication=1&only_user_pwd_authentication=1&platform_app_id=&next=/oauth/authorize/%3Fclient_id%3Dba231a873ea145af9f97866de4718fe6%26redirect_uri%3Dhttps%3A//instagram.com/%26response_type%3Dtoken%26display%3Dtouch%26scope%3Dpublic_content (0)
I/chromium: [INFO:CONSOLE(15)] "The key "viewport-fit" is not recognized and ignored.", source: https://www.instagram.com/accounts/login/?force_authentication=1&only_user_pwd_authentication=1&platform_app_id=&next=/oauth/authorize/%3Fclient_id%3Dba231a873ea145af9f97866de4718fe6%26redirect_uri%3Dhttps%3A//instagram.com/%26response_type%3Dtoken%26display%3Dtouch%26scope%3Dpublic_content (15)有什么办法来解决这个问题吗??
发布于 2020-04-23 14:53:31
看起来你必须添加这个调用
WebSettings settings = webView.getSettings();
settings.setDomStorageEnabled(true);这是这个issue的复制品
https://stackoverflow.com/questions/55819581
复制相似问题