FbDialog does not show full content on smaller devices

Steps to play

  • Log in to FB with a new FB account. I see that webdialog shows me current goals and other things, but I can not see Authorize OK to cancel (maybe shifted down). I can not scroll to see these buttons.

Can someone suggest me a quick fix without necessarily updating the FB SDK

+4
source share
3 answers

I just posted this workaround for: webDialog & CURRENT GOALS "header, but there is no button to authorize or cancel

In FaceBookSDK, I changed com / facebook / widget / WebDialog.java so that as soon as the web dialog has been loaded, it will look for the block containing "Current Goals" and hide it (if it exists). Once you do this, the buttons are visible again (at least they were for me).

In com / facebook / widget / WebDialog.java:

private class DialogWebViewClient extends WebViewClient {

// ... other methods ... @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); if (!isDetached) { spinner.dismiss(); } /* * Once web view is fully loaded, set the contentFrameLayout background to be transparent * and make visible the 'x' image. */ contentFrameLayout.setBackgroundColor(Color.TRANSPARENT); webView.setVisibility(View.VISIBLE); crossImageView.setVisibility(View.VISIBLE); // I don't know how to highlight in the code block // So I just add this extra long comment to make it obvious // Add a javascript call to hide that element, if it exists webView.loadUrl("javascript:try{ document.getElementById('nux-missions-bar').style.display='none'; } catch (e) {}"); // End changes } 

This should help, at least until FaceBook installs the API.

+1
source

I can confirm that this affects Facebook SDK 2 and 3 in Android. I can not talk with iOS. For some reason, scrollbars are disabled in WebDialog.java code, so I tried to include scrollbars in setUpWebView. Scroll bars will appear in this prompt, but the OK and Cancel buttons are missing. Thus, this is not the case when the buttons are off-screen and inaccessible, and the buttons are not part of the content at all when the "Current Goals" section is enabled.

This seems to be a Facebook issue that needs to be resolved on their side.

+2
source

I ran into the same problem that was resolved. I just changed my permission to an application that was running in sandbox mode> I just changed it in real time, and suddenly everything started working fine. I think there was a problem with fb sdk that has been resolved so far .....

0
source

Source: https://habr.com/ru/post/1481735/


All Articles