Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FaceBook Login:I want Facebook login to directly use the installed app for authorization. #2511

Open
5 tasks done
KillWilde opened this issue Dec 4, 2024 · 0 comments
Open
5 tasks done

Comments

@KillWilde
Copy link

Checklist before submitting a bug report

Xcode version

16.0

Facebook iOS SDK version

17.4.0

Dependency Manager

Other / I don't know

SDK Framework

Login

Goals

When an iOS app uses Facebook login, why can’t it invoke the installed Facebook app for authorization, and instead opens a webpage (limited.facebook.com) within the app? I manually integrated version 17.4.0 of the Facebook SDK and developed the app using Objective-C. How can I enable direct invocation of the Facebook app for authorization login?

1F467F46-0B84-4C23-BDE2-9CA0D0712434

Expected results

I want Facebook login to directly use the installed app for authorization.

Actual results

900C7E25-7598-4A6C-82C0-76FA956F80FC F37EB20F-8E55-4B92-AF6A-6C63EE7C1958

Steps to reproduce

No response

Code samples & details

// Below is the code I use to initiate the login:
FBSDKLoginManager *fbLoginManager = [[FBSDKLoginManager alloc] init];
    FBSDKLoginConfiguration *configuration =
    [[FBSDKLoginConfiguration alloc] initWithPermissions:@[@"public_profile"]
                                                  tracking:FBSDKLoginTrackingLimited
                                                     nonce:@"123"];
    [fbLoginManager logInFromViewController:self configuration:configuration completion:^(FBSDKLoginManagerLoginResult * _Nullable result, NSError * _Nullable error) {
        NSLog(@"facebook login result.grantedPermissions = %@,error = %@",result.grantedPermissions,error);
        if (error) {
            [SVProgressHUD showErrorWithStatus:TS(@"EE_DEV_NOT_LOGIN")];
            NSLog(@"Process error");
        } else if (result.isCancelled) {
            [SVProgressHUD showErrorWithStatus:TS(@"login_cancel")];
            NSLog(@"Cancelled");
        } else {
            NSLog(@"Logged in");
            [SVProgressHUD show];
            
            NSString *userID = FBSDKProfile.currentProfile.userID;
            self.tokenStr = userID;
            self.retryLoginCount = 0;
            [self requestGetListFacebook];
        }
    }];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant