通过 Web 应用程序登录 FB 后出现白屏? [英] blank white screen after FB login via web app?

查看:28
本文介绍了通过 Web 应用程序登录 FB 后出现白屏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试按照以下 FB 移动网络入门指南"进行操作:https://developers.facebook.com/docs/guides/mobile/web/对于我在 iPhone 上全屏打开的网络应用.

I have tried following the FB mobile web "getting started guide" at: https://developers.facebook.com/docs/guides/mobile/web/ for a web app that I open full-screen on my iphone.

但是当我尝试使用打开的 fb 登录页面登录时,单击登录"按钮后出现空白屏幕.虽然用户已登录..我知道这一点,因为如果我关闭并重新打开我的网络应用程序,我会检查登录状态并尝试获取一些用户信息,并且它工作正常......

but when I try to login using the fb login page that opens up, I get a blank white screen after I click the "login" button. The user IS logged in though.. I know this because if I close and reopen my web app, I check the login status and try to get some user info, and it works fine...

当我在桌面的 chrome 或 iphone 的 safari 中尝试相同的网络应用程序时,登录过程没问题……它只在全屏网络应用程序中中断.

When I try the same web app in my desktop's chrome or my iphone's safari, the login process is ok... it break only from within the full screen web app.

有什么想法吗??我只是在关注 FB 的示例代码 :-(

any ideas?? I'm merely following the sample code from FB :-(

谢谢.

推荐答案

我找到了解决该问题的方法...似乎我可以在 login() 方法中使用一个未记录的redirect_uri"属性,例如

I have found a workaround to the issue... seems there is an undocumented 'redirect_uri' attribute I can use in the login() method, e.g.

login({scope:'email', redirect_uri:'where_to_go_when_login_ends'})

它是为 fb 桌面 SDK 记录的,所以我试了一下,它有点工作.当我说有点"时,我的意思是在网络移动设备上,这似乎没问题,但是如果您尝试在桌面浏览器中运行它,登录弹出窗口将重定向到登录弹出窗口中的给定 url - 而不是在其父窗口中.

It IS documented for fb desktop SDKs, so I gave it a go and it sort of works. When I say "sort of", I mean that on web mobile, it seems ok, but if you try to run it in a desktop browser, the login popup will redirect to the given url within the login popup - not within its parent window.

我希望这足够好并且不会引起任何副作用,我真的不知道.但由于缺乏其他选择,这就是我在此期间将使用的:^)

I hope this is good enough and does not cause any side effects, I really can't tell. But this is what I'll use in the meantime for lack of other options :^)

这篇关于通过 Web 应用程序登录 FB 后出现白屏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆