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

查看:308
本文介绍了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 :-(

谢谢。

推荐答案

我找到了一个解决方法的问题...似乎有一个无证的'redirect_uri'属性我可以在login()方法中使用,例如

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 :^)

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

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