Facebook Connect opens navigator rather that FB app, then displays white screen after successfully logged-in


#1

Hi!

The title might not be very clear, so let me detail a little bit.

I’m using Steroids Add-ons in order to perform a Facebook Connect on my app.

On Android, it works like a charm!

On iOS, the first thing I notice is that when I’m trying to connect, it opens Facebook on the web browser rather than the Facebook app when it’s installed.

Then, when I accept to log in, I’m redirected to a white screen (still on web browser) with a “OK” button on the upper-left corner, then nothing happens, here’s what it looks like:

The rest of the page is completely blank.

If I click “OK” the brower’s page disapears and I’m back on my app, successfully logged-in, si I guess the only issue is that this page doesn’t hide itself.

I have set the “APP_ID” and “APP_NAME” in the plugin’s variables and set the “fb[APP_ID]” in the Custom URL Schemes in the Build Settings, I also have set the App Store ID and checked “Single Sign On” in the Facebook’s settings, and here’s my code:

fb_checkConnexionStatus = function()
{
	steroids.addons.facebook.getLoginStatus().then(function(result)
	{
		if (result.status==='connected')
		{
			steroids.addons.facebook.logout().then(function()
			{
				fb_connect();
			});
		}
		else
		{
			fb_connect();
		}
	});
}

fb_connect = function()
{
	steroids.addons.facebook.login(['public_profile','email']).then(function()
	{
		steroids.addons.facebook.api('/me', { fields: ['id', 'email', 'first_name', 'last_name'] }).then(function(fbuser)
		{
			// do stuff with user's informations
		});
	});
}

I have removed the .error() functions so that the code is as clear as possible.

I first call the fb_checkConnexionStatus() function to check if the user is alreadi logged in, in wich case I first log him out, an then fb_connect() is called to log him in and get the infos.

Any idea on what’s going wrong?


#2

Absolutely no one? :disappointed: