IOS does not call Facebook authentication callback

I am making a facebook application using the latest version of Xcode4.2 and the Facebook SDK. I copied the hackbook to my application and replaced the method name. Then it worked! [Enter image description here] [1]

But when I click the "OK" button, there is no answer. I checked the details. Somehow, iOS does not call OpenURL in appdelegate.m.

Why doesn’t iOS call the method? Here is the code.

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { return [self.facebook handleOpenURL:url]; } - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [self.facebook handleOpenURL:url]; } 

Please let me know what happened.

Thanks in advance.

+4
source share
2 answers

Have you set your Facebook ID in your application properties list file? If you have not done so, the Facebook application does not call a callback for your application.

Read the instructions here in the "Modify the application properties list file" section: https://developers.facebook.com/docs/mobile/ios/build/

Basically, you need to create a new line in your application layer with URL type names with one element, URL schemes containing a single value, fbYOUR_APP_ID (literal characters fb followed by your application identifier).

+8
source

I also had this error after it already worked, and it turned out that several xcode restarts completed its fix.

0
source

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


All Articles