Unity Authentication (UAS) - SignInWithFacebookAsync Permission Denied

When I pass the facebook access token to Unity Authentication, by calling AuthenticationService.Instance.SignInWithFacebookAsync(accessToken), I got errors from each catch :

  1. [Authentication]: Request failed: 401, {“title”:“PERMISSION_DENIED”,“detail”:“unable to validate token”,“details”:,“status”:401}

  2. WebRequestException: {“title”:“PERMISSION_DENIED”,“detail”:“unable to validate token”,“details”:,“status”:401}

Below is my code, AuthCallback will be called after user logged in through facebook.

    private async void AuthCallback(ILoginResult result)
    {
        if (FB.IsLoggedIn)
        {
            // AccessToken class will have session details
            var aToken = Facebook.Unity.AccessToken.CurrentAccessToken;
            // Print current access token's User ID
            Debug.Log("UserId : " + aToken.UserId);
            // Print current access token's granted permissions
            foreach (string perm in aToken.Permissions)
            {
                Debug.Log(perm);
            }
            await SignInWithFacebookAsync(aToken.TokenString);
        }
        else
        {
            Debug.Log("User cancelled login");
        }
    }

    private async Task SignInWithFacebookAsync(string accessToken)
    {
        try
        {
            await AuthenticationService.Instance.SignInWithFacebookAsync(accessToken);
            Debug.Log("SignIn is successful : " + AuthenticationService.Instance.PlayerId);
        }
        catch (AuthenticationException ex)
        {
            // Compare error code to AuthenticationErrorCodes
            // Notify the player with the proper error message
            Debug.LogException(ex);
        }
        catch (RequestFailedException ex)
        {
            // Compare error code to CommonErrorCodes
            // Notify the player with the proper error message
            Debug.LogException(ex);
        }
    }

Found out the reason. When creating a Facebook app through the Facebook Developer console, the Consumer app type must be selected for it to work.