Facebook MultiLogin in Android Webview

I have an embedded webview in my application. I have to show Facebook MultiLogin at one point during which the popup that appears when I try to login does not appear. The facebook login opens in a new window. As soon as I successfully login, I ended up in a blank window. How can I overcome this? Even the cancel button on the login page doesn't do anything. If I open this URL in the base Android browser, the popup looks great and everything works as intended.

The multilingual I am talking about is similar to the comment box you will find on this page.

http://www.insidefacebook.com/2011/03/07/comments-box-google-twitter/

I have overridden the shouldOverrideUrlLoading method for my webview as

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

      

Can anyone help me? Sorry if this has already been resolved, but I couldn't find the post anywhere.

-Hari

+1


source to share


1 answer


I don't quite understand your question. But if you want to close the WebView at a 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;
     }
}

      

0


source







All Articles