Facebook SDK Webview对话框不可单击

尼古拉(Nickolai Astashonok)

我在LG Pro设备(Android OS 4.1.2)上遇到了非常奇怪的问题

在下一页上,无法单击“确定”和“取消”按钮。

在此处输入图片说明

我无法在其他设备上重现所描述的行为:G Nexus(4.1.2)和Samsung GS3(4.1.1)。

在LGE设备上,我无法继续在多个市场应用程序上登录。同样,我在Facebook Sample应用程序中的行为也是如此。

我尝试了其他版本的FB SDK,修改/优化了webview-没有结果。

在标准浏览器中,我可以单击“确定”和“取消”按钮。

One thing that is working for me is to change WebView layout params from match_parent to wrap_content. I was be able to click on first "Current goals" (basic permissions), but on the second (pusblish permission), webview looks very small at first and then starts increasing height (I can attach screenshot, if my explanation isn't clear).

I've find that there was an issue on Facebook side with that screen. (http://developers.facebook.com/bugs/375733199212934) Maybe it is some king of regression... I don't know.

Anyway, any help and workaround for LG Pro device will be very helpful. Thanks

allprog

WebView manipulation

You can attach a WebViewClient to the WebView with the setWebViewClient() method. When the loading of the page is finished, you can examine the URL that was loaded (onPageFinished()) and identify if it may be problematic on the current device. If it is probable, then you can run a javascript command that can modify the styles so that the scrolling is not disabled any more. I haven't tried to do this modification yet but I'm pretty sure it can be done as any DOM modification is possible from javascript.

I don't say this is a stable solution. You need to monitor it closely in production but a possible way out of the dead end as FB seems to be reluctant to handle it properly.

Built-in browser solution

您可以使用内置的浏览器来实现登录和授权过程。使用URL启动意图https://www.facebook.com/dialog/oauth?client_id={app-id}&redirect_uri={redirect-uri}(本文中的示例:向浏览器发送意图以打开特定的URL

redirect-uri授权完成后,参数将告知浏览器返回您的应用。(示例:从android浏览器启动自定义android应用程序)您应该使用scheme模式。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章