0

I need to load my login web page URL to my app via webview(Android).In my web url contains Facebook and Google oauth login. Login with Google was working fine but while login with facebook gives me a Blank Page.

I saw so many answers regarding the same issue on Stack Overflow.But i did't get the working solution.

Based on my research i think the problem was facebook open a popup window while logging in.Even i tried redirected the url based on the facebook. I tried the following code for redirecting but not worked for me.

 if(url.startsWith("https://www.facebook.com/dialog/oauth")){
       String redirectUrl = "http://www.example.com";
       view.loadUrl(redirectUrl);
       return;
 }

So please help any one how can i achieve the solution.Thanks in advance.

GowriShankar
  • 1,654
  • 18
  • 30
  • Possible duplicate of [Making facebook login work with an Android Webview](http://stackoverflow.com/questions/12648099/making-facebook-login-work-with-an-android-webview) – Mark McClelland Apr 16 '17 at 03:01

2 Answers2

0

A little late to the party. But... One reason why you would get an empty screen might be that you did not enter the right hash key in de Facebook App Settings. So make sure that is correct. Also your app needs the internet permission set in AndroidManifest.xml.

<uses-permission android:name="android.permission.INTERNET" />
Klaassiek
  • 2,795
  • 1
  • 23
  • 41
0

Try moving your webview to xml layout file. The blank page error was caused due to js script fail while redirecting oAuth login to authorization acceptance page. You overcome this issue by moving your webview into ml layout.

Prakhs
  • 579
  • 1
  • 3
  • 8