Facebook的登录网页内的web视图不工作视图、网页、工作、Facebook

2023-09-07 23:13:46 作者:双眼皮的姑娘最萌呐!

我有一个打开一个网页内的WebView,并尝试使用Facebook的登录选项登录到它,但失败了里面的WebView空白屏幕。

I have a opening a webpage inside webview and trying to login into it using facebook login option, but failed with blank screen inside webview.

上PageFinish() WebViewClient 显示第 HTTPS://m.facebook .COM /对话框/ OAuth的?redirect_uri =的http%3A%2F%2 ......... 已加载但未能显示重定向的URL

on PageFinish() under WebViewClient showing page https://m.facebook.com/dialog/oauth?redirect_uri=http%3A%2F%2......... is loaded but failed to show redirected url

我使用

webView.getSettings().setJavaScriptEnabled(true);
            webView.clearCache(true);
            webView.clearHistory();
            webView.getSettings().setSupportZoom(true);
            webView.getSettings().setBuiltInZoomControls(true);
            webView.getSettings().setLoadWithOverviewMode(true);
            webView.getSettings().setUseWideViewPort(true);
            webView.loadUrl("http://www.xyz.com/");
            webView.setWebViewClient(new MyWebViewClient(this));
            webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
            webView.addJavascriptInterface(new WebAppInterface(this), "HTMLOUT");

帮助它 谢谢你。

推荐答案

截至2013年10月的,Facebook的不再允许应用程序通过定制webviews登录。

As of October 2013, facebook no longer allows apps to login via custom webviews.

每这篇博客,他们想让你使用软件开发工具包。

Per this blog post, they want you to use the SDKs.