Facebook v1.3.1.8 always using web dialog for login

I was using v1.3.0.18 for a few days and everything worked quite well, except for the FB app sometimes not returning to my app on login.

To see if this had been fixed, I updated to v1.3.1.8 yesterday using ‘sdkbox update’, but now the FB web version is always used instead of the FB app. And I get this message on sdkbox::PluginFacebook::init()

ERR: fb: init fsg

What does it mean?

I am using cocos2d-x 3.8.1 and Xcode 7

Ignore that error message, that is a mistake.
However we’ll look into the always using web login issue.

Ok, thanks!

Is the 1.3.1.8 web login issue confirmed?

Yes, it’s confirmed.

So we tested this “web login” bug using facebook’s own ‘share it’ sample and it always uses web login…

I think it’s safe to say it’s a bug in facebook’s latest SDK

I see. How are you going to handle this? Revert to an older SDK version in the upcoming sdkbox version?

I think at this point we’ll keep updating to their latest SDK since their old version don’t support iOS9 that well.

Ok thanks for the info.

So here is FB’s reply

https://developers.facebook.com/bugs/749225888543197

I think we’re going to downgrade to 4.6 versions of FB SDK until they provides a better login experience.

Thanks for the update!

Or we can fork a branch. It’s not the first time I did this…

Did you do anything more with this?

We are evaluating fork the Facebook SDK github and create our own version of the SDK, If you find anyone already did it please let me know.

Did you see this?

It seems to imply that while the browser login mode is set as default, it is still possible to configure the SDK to use the app switch mode instead.

It could also be worth checking if this workaround posted by a guy at Microsoft is working:

Leon Yang · Sr SDE at Microsoft
Found a workaround:

In FBSDKCoreKit/arc/FBSDKServerConfigurations.m, modify method _useFeatureWithKey:dialogName by changing:

return [(NSNumber *)(_dialogFlows[dialogName][key] ?:
                     _dialogFlows[FBSDKDialogConfigurationNameDefault][key]) boolValue];

to

return [(NSNumber *)(_dialogFlows[@"message"][key] ?:
                     _dialogFlows[FBSDKDialogConfigurationNameDefault][key]) boolValue];

In my case, server configuration response contains “message” instead of “login” key which is required by the above check. Tested with FBSDKCoreKit 4.7.1 and Graph API v2.5.

This is subject to future API change and may not work when Facebook remove “message” key so use it with caution…