vue에 자바스크립트를 이용해서 카카오 로그인을 구현하고있습니다.
vuex에
loginWithKakao ({commit}, payload) {
Kakao.Auth.login({
success: function(authObj) {
Kakao.API.request( {
url : ‘/v1/user/me’,
success: function(res) {
var sGetName = res.properties.nickname
commit(‘setUser’, sGetName)
}
})
this.$http.post(‘http://localhost:8000/accounts/rest-auth/kakao/’, {“access_token”:authObj.access_token})
.then(response => {
let Token = response.data.token
commit(‘setToken’, Token)
})
.catch(error => {
console.log(error)
})
},
이렇게 추가했는데 Kakao가 정의되지 않은 함수라고 나오네요.
index.html파일 에 도 잘 추가됐습니다.
왜 kakao 함수를 못불러오는걸까요ㅠ