facebook / facebook-ios-sdk

Used to integrate the Facebook Platform with your iOS & tvOS apps.

Home Page:https://developers.facebook.com/docs/ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I cant find FBSDKLoginManager class in login kit.

nickqlx opened this issue · comments

commented

Checklist before submitting a bug report

Xcode version

15.4

Facebook iOS SDK version

17.0.2

Dependency Manager

Prebuilt Binaries

SDK Framework

Login

Goals

I want to process the login flow and follow the steps mentioned on the developer portal. I am working on my old Objective-C project. I am not able to use FBSDKLoginManager.

Expected results

I want to implement the login flow.

Actual results

Screenshot 2024-06-20 at 12 32 30 PM

Steps to reproduce

No response

Code samples & details

// INSERT YOUR CODE HERE
 FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
    FBSDKLoginConfiguration *configuration = [[FBSDKLoginConfiguration alloc]
                                              initWithPermissions:@[@"public_profile", @"email"]
                                              tracking:FBSDKLoginTrackingLimited];
    [login logInFromViewController:self
                     configuration:configuration
                        completion:^(FBSDKLoginManagerLoginResult * _Nullable result, NSError * _Nullable error) 

{

}];
commented

Please share the demo app in Objective C if anyone has implemented the latest version of the SDK.

Use this:
#import <FBSDKLoginKit/FBSDKLoginKit-Swift.h>
instead of this:
#import <FBSDKLoginKit/FBSDKLoginKit.h>

This worked for me. I think meta folks are migrating the code to a package where it can be used by swift also.

commented

Use this: #import <FBSDKLoginKit/FBSDKLoginKit-Swift.h> instead of this: #import <FBSDKLoginKit/FBSDKLoginKit.h>

This worked for me. I think meta folks are migrating the code to a package where it can be used by swift also.

Thank you so much.