iosfacebookmobileweb-applications

Blank white screen after Facebook login via web app?


I have tried following the Facebook 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.

When I try to login using the Facebook 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.

When I try the same web app in my desktop's chrome or my iPhone's Safari, the login process is ok; it breaks only from within the full screen web app.

Any ideas? I'm merely following the sample code from Facebook :-(


Solution

  • 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'})
    

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