Kakao.Auth.login({
success: function(authObj) {
Kakao.API.request({
url:'/v2/user/me',
success: function(res){
console.log(res);
var id = res.id; //데이터베이스의 primary Key값 속성 즉 기본키의 식별성
var email = res.kakao_account.email;
var name = res.properties.nickname;
var html = '<BR>'+ email + '<BR>' + name;
$('body').append(html);
}
})
console.log(authObj);
var token = authObj.access_token;
},
fail: function(err) {
alert(JSON.stringify(err));
}
});
닉네임호출시 Uncaught TypeError: Cannot read property ‘nickname’ of undefined 라고 뜨네요
어디서 문제가 발생한건가요?