Instagram에서 인증하려면 Instagram에서 보낸 URL을 리디렉션으로 보내야합니다. 리디렉션 된 URL을 가져올 필요가 있지만 null 값을 얻습니다.리디렉션 후 URL 가져 오기
$.ajax({
url: "https://instagram.com/oauth/authorize/?client_id=e40f15a90**c89851d8a66&redirect_uri=http://examle.com&response_type=token",
success:function(result,status,xhr){
console.log(xhr.getResponseHeader('Location'));<---NULL
}
});
나는 이것이 AJAX를 통해 가능하지 않다고 생각합니다. _ 배경 화면의 요청이므로 브라우저는 자동으로 리디렉션을 따릅니다. 따라서 제어가 스크립트로 되돌려지면 더 이상 Location 헤더가 없습니다. – CBroe