Search code examples
androidfacebookandroid-webviewfacebook-android-sdkfbsdksharedialog

Facebook ShareDialog doesn't load after a WebView open


I am working on an android app which have local HTML pages to show in WebView and an option to share some content on Facebook using ShareDialog.

  • When ShareDialog is shown after a WebView loading started, It keeps loading and nothing happens. Even if I close WebView and show ShareDialog it keeps loading.
  • When ShareDialog is shown before WebView loading started, It works right.

I have try clearing WebView cache before showing ShareDialog.


Solution

  • I was calling webView.pauseTimers() from onPause() of my Fragment, which is stopping all WebView process, resulting in above error.

    Fixed it by webView.resumeTimer() before showing dialog.