FBSDK (New Facebook SDK 4.0) Implementation is not working for Login with Facebook

后端 未结 5 2065
予麋鹿
予麋鹿 2021-01-01 19:35

I am using this following block which is mentioned in Facebook Developer. But when my App callbacks from Browser then it

5条回答
  •  一向
    一向 (楼主)
    2021-01-01 20:28

    You must add the following method in your appDelegate

    - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
        return [[FBSDKApplicationDelegate sharedInstance] application:application
                                                              openURL:url
                                                    sourceApplication:sourceApplication
                                                           annotation:annotation];
    }
    

    If the above method is not present into AppDelegate then it results into cancelled state.

    Refer to : https://developers.facebook.com/docs/ios/getting-started#startcoding

提交回复
热议问题