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

Update to 17.0.0 #58

Merged
merged 4 commits into from
Apr 10, 2024
Merged

Update to 17.0.0 #58

merged 4 commits into from
Apr 10, 2024

Conversation

AGulev
Copy link
Contributor

@AGulev AGulev commented Apr 3, 2024

fix #57

@AGulev AGulev requested a review from britzl April 3, 2024 11:16
@AGulev
Copy link
Contributor Author

AGulev commented Apr 3, 2024

@britzl could you pls test one thing pls on ios?

  1. initialize
  2. login
  3. Read name - check if it's fine

@AGulev
Copy link
Contributor Author

AGulev commented Apr 3, 2024

UPD: I found another phone for tests, and it seems like there is an issue with that
Login is fine, but when I try to get name I have
image

I'm looking into it now

@AGulev
Copy link
Contributor Author

AGulev commented Apr 9, 2024

@britzl now it's ready for review

@AGulev
Copy link
Contributor Author

AGulev commented Apr 9, 2024

a bit of context for the future:

Now there are two types of login FBSDKLoginTrackingLimited and FBSDKLoginTrackingEnabled
FBSDKLoginTrackingEnabled - this is current type of login
FBSDKLoginTrackingLimited - new one which doesn’t provide token (actually you can get it, but if you try to use it - it’s invalid) you can use with Graph API instead it provides AuthenticationToken you can use for login

Also, all the data was requested with permissions will be available in FBSDKProfile.currentProfile

ObjC example:

 FBSDKLoginManager *loginManager = [FBSDKLoginManager new];
FBSDKLoginConfiguration *configuration =
  [[FBSDKLoginConfiguration alloc] initWithPermissions:@[@"email", @"user_friends", @"user_birthday", @"user_age_range", @"user_hometown", @"user_location", @"user_gender", @"user_link"]
                                              tracking:FBSDKLoginTrackingLimited
                                                 nonce:@"123"];
[loginManager logInFromViewController:self
                        configuration:configuration
                           completion:^(FBSDKLoginManagerLoginResult * result, NSError *error) {
  if (!error && !result.isCancelled) {
    // Login successful

    // getting user ID
    NSString *userID =
      FBSDKProfile.currentProfile.userID;

    // getting id token string
    NSString *idTokenString =
      FBSDKAuthenticationToken.currentAuthenticationToken.tokenString;

    // fetching pre-populated email
    NSString *email = FBSDKProfile.currentProfile.email;
  
    // getting pre-populated friends list
    NSArray<FBSDKUserIdentifier *> *friendIDs = FBSDKProfile.currentProfile.friendIDs;

    // getting pre-populated user birthday
    NSDate *birthday = FBSDKProfile.currentProfile.birthday;

    // getting pre-populated age range
    FBSDKUserAgeRange *ageRange = FBSDKProfile.currentProfile.ageRange;  
  
    // getting pre-populated age range
    FBSDKLocation *hometown = FBSDKProfile.currentProfile.hometown;  
  
    // getting pre-populated age range
    FBSDKLocation *location = FBSDKProfile.currentProfile.location;  
  
    // getting pre-populated age range
    NSString *gender = FBSDKProfile.currentProfile.gender;  
  
    // getting pre-populated age range
    NSURL *userLink = FBSDKProfile.currentProfile.linkURL;  
  }
}];

What's done:

  • a way to use FBSDKLoginTrackingLimited as a separate Lua function
  • a way to get FBSDKProfile.currentProfile data
  • a way to get FBSDKAuthenticationToken.currentAuthenticationToken

Copy link
Contributor

@britzl britzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@AGulev AGulev merged commit d4b622e into master Apr 10, 2024
1 check passed
@AGulev AGulev deleted the update-extension branch April 10, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update facebook sdk to support apple privacy manifest
2 participants