title: Facebook Sdk crash Webview login
body: <p>I am using the Facebook Sdk 4.1.0 as dependency in my app. To do login, I follow this instructions:  <a href="https://stackoverflow.com/questions/29605236/cant-get-location-and-email-using-facebook-api/29605975#29605975">Can&#39;t get location and email using Facebook API</a></p>
  
  <p>And login works fine if the Facebook apps is installed in the device but if the Facebook app is not installed (login goes throw a webview created by facebook) then my app crash if the user click on the button login inside the webview:</p>
  
  <p><img src="https://i.stack.imgur.com/sY4B5.jpg" alt="enter image description here"></p>
  
  <p>And if the user press de Log in button the app crash inmediatly:</p>
  
  <blockquote>
    <p>android.view.WindowManager$BadTokenException: Unable to add window --
    token null is not for an application at
    android.view.ViewRootImpl.setView(ViewRootImpl.java:559) at
    android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:269)
    at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
    at android.app.Dialog.show(Dialog.java:289) at
    android.app.AlertDialog$Builder.show(AlertDialog.java:951) at
    com.android.webview.chromium.WebViewContentsClientAdapter.onSavePassword(WebViewContentsClientAdapter.java:752)
    at
    com.android.org.chromium.android_webview.AwContentsClientCallbackHelper$1.handleMessage(AwContentsClientCallbackHelper.java:157)
    at android.os.Handler.dispatchMessage(Handler.java:102) at
    android.os.Looper.loop(Looper.java:136) at
    android.app.ActivityThread.main(ActivityThread.java:5271) at
    java.lang.reflect.Method.invokeNative(Native Method) at
    java.lang.reflect.Method.invoke(Method.java:515) at
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:851)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:667) at
    dalvik.system.NativeStart.main(Native Method)</p>
  </blockquote>