大马资讯论坛 - 马来西亚中文资讯平台

 找回密码
 注册
搜索

[教学] Android webview facebook dialog oauth client keep reloading

[复制链接]
发表于 2015-4-12 00:16:28 | 显示全部楼层 |阅读模式
在 Android - 5.0 Lollipop 一直刷新个不停
[Solved] Android webview facebook dialog oauth client keep reloading - non stop
window.location.assign(https://www.facebook.com/dialog/oauth?client_id=)

加这个Add CookieManager.getInstance()
  1. WebView myWebView = (WebView)rootView.findViewById(R.id.fb);
  2.                        
  3. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
  4.     CookieManager.getInstance().setAcceptThirdPartyCookies(myWebView, true);
  5. }
  6.                        
  7. myWebView.getSettings().setAppCacheEnabled(true);
  8. myWebView.getSettings().setJavaScriptEnabled(true);
  9. myWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
  10. myWebView.getSettings().setSupportMultipleWindows(true);
复制代码

手机版|大马资讯论坛  

GMT+8, 2022-8-11 15:59 , Processed in 0.044142 second(s), 13 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表