IOS Facebook Cannot authorize if Facebook application is installed

Facebook SSO authentication works very well in my iOS application when using Safari, but if I have the Facebook application installed, SSO redirects it to it and authorization freezes. It's not like many other people say on SO, I get a blank dialog box that just says "Loading ...". It is forever forever and ultimately a failure.

I can get the application to always use Safari authentication, but I would like to know if there is a way to get the FB application to work before resorting to this.

+4
source share
2 answers

I have the same behavior and the appDelegate method has been applied.

By looking at the URL obtained by this method, I realized that my package ID was different in the application configuration on the Facebook page: "Fb41810xxxxxx: // authorize # error_description = Invalid% 2BIOS% 2Bbundle% 2BID & error = unknown% 5Ferror"

I fixed the setting and everything was fine.

+4
source

Make sure the appdelegate application implements the method application: openURL, for example:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [[[FacebookController sharedInstance] facebook ]handleOpenURL:url]; } 
-1
source

Source: https://habr.com/ru/post/1384185/


All Articles