简体   繁体   中英

WebView - get back to Facebook comment when login successful

I'm developing a travel application. It has many place and user can comment on it using facebook comments.
I used a WebView to display facebook comments. It can show the comments. 在此输入图像描述

But when click login and login successfully, the webview stand at that page and don't come back to Comment box.
在此输入图像描述

How to make WebView get back to comment box page or get something callback when login successfully?

Maybe you get a link back, when the page has finished loading. This link allows you to check and then trigger an action.

WebView webView = (WebView) findViewById(R.id.webViewAuth);
String url = "<Facebook auth url>";
webView.loadUrl(url);
webView.setWebViewClient(new WebViewClient() {
    public void onPageFinished(WebView view, String url) {
        view.getUrl();
    }
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM