We have a website that has a requirement to use KakaoTalk to share an image. After using the login API and getting the access token from redirect URI, we get this error:
this is how I get the access token from the redirect URI
let sParam = "code";
let sPageURL = window.location.search.substring(1),
sURLVariables = sPageURL.split("&"),
sParameterName,
i;
let authObj = null;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split("=");
if (sParameterName[0] === sParam) {
authObj =
sParameterName[1] === undefined
? true
: decodeURIComponent(sParameterName[1]);
}
}
Kakao.Auth.setAccessToken(authObj);
console.log(Kakao.Auth.getAccessToken())
I would also like to point out I dont speak korean. But google translate kinda works to some extent.