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

17.0 Limint login Error #725

Open
4 tasks done
Herb95 opened this issue May 30, 2024 · 0 comments
Open
4 tasks done

17.0 Limint login Error #725

Herb95 opened this issue May 30, 2024 · 0 comments
Labels

Comments

@Herb95
Copy link

Herb95 commented May 30, 2024

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Unity Editor Version: 2020.3.3f1
  • Unity SDK Version: 17.0.0
  • Installation Platform & Verison: [iOS] version 15.4.1

Goals

Facebook limit login successful

Expected Results

Facebook limit login successful

Actual Results

[FB_SDK] OnLimitFbLogin

[FB_SDK]  FB.IsLoggedIn :  False   AttStatus: false

FB_SDK] OnLimitFbLogin
 RawResult: {"callback_id":"2","cancelled":"true"}
 Cancelled: False
 Error:
 IsLoggedIn: False
 AuthenticationToken: 

Steps to Reproduce

Using basic sample programs

Code Samples & Details

 public static void OnLimitFbLogin(Action<string> onFbLoginSucceed = null, Action<bool, string> onFbLoginFailed = null)
    {
        FB.Mobile.LoginWithTrackingPreference(LoginTracking.LIMITED, FacebookPermissions, null, (result) =>
        {
            if (result == null)
            {
                onFbLoginFailed?.Invoke(false, "登录失败,获取参数失败,请重试!");
                return;
            }
            
            if (string.IsNullOrEmpty(result.Error) && FB.IsLoggedIn)
            {
                
                AuthenticationToken authenticationToken = result.AuthenticationToken;
                if (!string.IsNullOrEmpty(userId) && authenticationToken != null)
                {
                    var resultJson = Facebook.MiniJSON.Json.Serialize(resulInfo);
                    onFbLoginSucceed?.Invoke(resultJson);
                }
                else
                {
                    onFbLoginFailed?.Invoke(false, "获取数据失效,请重试!");
                }
            }
            else
            {
                Log.Info($"[FB_SDK]FBLoginFailed:--->Cancelled:{result.Cancelled}\n--->Error: {result.Error}\n--->RawResult: {result.RawResult}");
                onFbLoginFailed?.Invoke(false, result.Cancelled ? "用户取消登录" : result.Error);
            }
        });
    }
@Herb95 Herb95 added the bug label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant