Facebook的多重登入Android中网页视图登入、视图、网页、Facebook

2023-09-06 18:19:18 作者:温柔触人心

我在我的应用程序的嵌入式网页视图。我必须表明Facebook的新的多重登入在一​​个点,在此期间弹出就像试图登录不出现时,通过显示窗。 Facebook登录在新窗口中打开。有一次我登录成功,我带到了一个空白窗口。我该如何克服呢?即使在登录页面的取消按钮不会做任何事情。如果我打开这个网址在Android的基本的浏览器,在弹出的出现完全正常的,一切按预期工作。

I have an embedded webview in my app. I have to show Facebook's new MultiLogin at one point during which the popup like window which appears when trying to login does not appear. The facebook login opens up in a new window. Once I successfully login, I'm taken to a blank window. How do I overcome this? Even the cancel button in the login page does not do anything. If I open this url in Android's basic browser, the popup appears perfectly fine and everything works as intended.

这是我指的是像您在本页面发现的评论窗口多重登入。

The Multilogin that I'm referring to is like the comments window that you find in this page.

http://www.insidefacebook.com/2011 / 03/07 /评论框,谷歌,Twitter的/

我已重写我的WebView的shouldOverrideUrlLoading方法,

I have overridden the shouldOverrideUrlLoading method for my webview as,

public boolean shouldOverrideUrlLoading(WebView view, String url) {
 return false;
}

有人可以帮助我?如果这个道歉已经得到了解决,但我找不到任何地方的职位。

Can someone help me with this? Apologies if this has already been resolved, but I could not find the post anywhere.

-Hari

推荐答案

我不完全明白你的问题。但是,如果你想关闭的WebView在特定的URL,你可以使用shouldOverrideUrlLoading这样。

I don't fully understand your question. But if you want to close WebView in specific url, you can use shouldOverrideUrlLoading like this.

public boolean shouldOverrideUrlLoading(WebView view, String url) {
    if( url.equals("process-done-url") {
       myWebView.close(); //just psuedocode. I'm not sure exact method
       return true; // don't handle url in other place. 
     } else {
         return false;
     }
}
 
精彩推荐
图片推荐