JosephNK / flutter_kakao_login

A Flutter plugin for using the native Kakao Login SDKs on Android and iOS.
BSD 2-Clause "Simplified" License
35 stars 15 forks source link

KakaoAccountResult returning null except for userId #15

Closed charkala closed 4 years ago

charkala commented 4 years ago

First of all thank you @JosephNK for creating this, I find it much better than the other package out there since it's much easier to use 👍

My issue is that final KakaoLoginResult result = await kakaoSignIn.getUserMe(); returns null except for userId.

When I debugged kakaoSignIn.getUserMe() method, the result seems to be there.

login_page.dart

final KakaoLoginResult result = await kakaoSignIn.getUserMe();
print('userName: ${result.account.userNickname}');

flutter: userNickname: null
flutter_kakao_login.dart

// Get UserMe Method
Future<KakaoLoginResult> getUserMe() async {
    final Map<dynamic, dynamic> result =
        await _channel.invokeMethod('getUserMe');

        print('debug: ${result.toString()}');

        return _delayedToResult(
            new KakaoLoginResult._(result.cast<String, dynamic>()));
 }

flutter: debug: {status: loggedIn, userID: xxxxxxxxxx, userNickname: xxxxxxxx}

Not sure why it won't return the value.

JosephNK commented 4 years ago

Hi @charkala. Do you get a nickname? userNickname and userID is null? What is a test device? iOS? Android?

charkala commented 4 years ago

@JosephNK Hello. await kakaoSignIn.getUserMe() returns only userID: xxxxxxxxx, all other fields are null but when I print from inside the package (see my print() line) it returns both userID and userNickname.

For my Kakao Dev Console, I've enabled profile (nickname/profile photo) and account (email). I've also setup the SDK from their guide with no problem.

I have tested on both devices, Android (Samsung) and iOS (iPhone) and all same results.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

KuldeepVagadiya commented 3 years ago

@JosephNK 안녕하세요, 계정 데이터를받지 못하는 것과 같은 문제가 있습니다.이 문제를 해결하는 방법을 알려주세요. 즐거운 하루 되세요.

please ans this, because I have not getting any account details, please let me know the solution