Blank screen with mobile web app with Facebook Connect

Possible duplicate:
blank white screen after logging into FB via web app?

I am creating a web app that can open full screen on an iPhone and am following the code for the Facebook mobile website which can be found at: https://developers.facebook.com/docs/guides/mobile/web/

When I try to login using the Facebook login page, 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 the web app I check the login status and try to get some information about the user and it works fine.

I've seen others with the same: blank white screen after logging into FB through a web app?

It seems like someone has figured out a workaround, but I can't seem to get it to work. The code I'm using:

   function loginUser() {    
     FB.login(function(response) { }, {scope:'email'});    
     }

      

Others have pointed out that I need to use a workaround here:

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

      

Does anyone know how to combine these pieces of code to make it work?

Thank!

+3


source to share


1 answer


This should work: function loginUser () {FB.login (function (response) {}, {scope: 'email', redirect_uri: 'http: // your-redirect-url'}); }



+1


source







All Articles