Current goals hide facebook ok button during Facebook login in web view

We are using the latest version of the Facebook iOS SDK (3.5) and have the following web logon issue. The "Current Goals" tab hides the "facebook ok" and "Cancel" buttons, so the user cannot allow the use of the application.

Steps to play:

1) Log in using the Facebook UIWebView SDK 2) The text β€œYou are already logged in ...” 3) OK and the β€œCancel” button are hidden, and the view DOES NOT scroll.

Is there any workaround?

------------- UPDATE -------------

Now the problem is fixed by Facebook.

+1
source share
1 answer

I'm not sure if this will help iOS users, but I can tell you how I fixed it for my Android application if someone else encounters this error (and maybe someone can transfer this fix to iOS) .

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 "Current Goals" block and hide it (if it exists).

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 } 
+1
source

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


All Articles