phpclasses 코드를 활용해서 카카오 아이디로 로그인을 만들어 보고 있습니다.
크롬,파이어폭스는 잘 되는데요. 유독 ie8(현재 xp,win7 테스트)에서만 스크립트에러가 나면서 진행이 안됩니다.
잘못 코딩된 부분이 있다면 조언 부탁드립니다. 감사합니다.
카카오 관련 부분만 간략하게 붙여봅니다.
oauth_client 설정부분
Function Initialize()
{
if(strlen($this->server) === 0)
return true;
// 기본설정 - case에서 개별설정 가능
$this->request_token_url = '';
$this->append_state_to_redirect_uri = '';
$this->authorization_header = true;
$this->url_parameters = false;
$this->token_request_method = 'GET';
$this->signature_method = 'HMAC-SHA1';
switch($this->server)
{
case 'Kakao':
$this->oauth_version = '2.0';
$this->dialog_url = 'https://kauth.kakao.com/oauth/authorize?client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&response_type=code HTTP/1.1&state={STATE}';
$this->access_token_url = 'https://kauth.kakao.com/oauth/token';
break;
~~
}
}
API 호출부분
/*
* Get the http.php file from http://www.phpclasses.org/httpclient
*/
$client = new oauth_client_class;
$client->debug = false;
$client->debug_http = true;
$client->server = 'Kakao';
$client->redirect_uri = 'http://'.$_SERVER['HTTP_HOST'].
dirname(strtok($_SERVER['REQUEST_URI'],'?')).'/login_with_kakao.php';
$client->client_id = $CLIENT_ID; $application_line = __LINE__;
if(strlen($client->client_id) == 0)
die('카카오연동 오류');
/* API permissions */
if(($success = $client->Initialize()))
{
if(($success = $client->Process()))
{
if(strlen($client->access_token))
{
$success = $client->CallAPI(
// kakao API request
'https://kapi.kakao.com/v1/user/me',
'GET', array(), array('FailOnAccessError'=>true), $user);
}
}
$success = $client->Finalize($success);
}
if($client->exit)
exit;
if($success)
{
$client->GetAccessToken($AccessToken);
// 여기까지 넘어온 값 정상 - 체크 및 디비 업데이트
include_once("./login_check.php");
?>
에러내용 붙입니다.
ie8 웹 페이지 오류 세부 정보 스크랩
사용자 에이전트: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.2; .NET4.0C; .NET4.0E)
타임스탬프: Tue, 19 Aug 2014 05:31:40 UTC
메시지: 개체가 이 속성 또는 메서드를 지원하지 않습니다.
줄: 2
문자: 2759
코드: 0
URI: https://auth.kakao.com/assets/kakao_accounts_libs-e577bed29c51e5ff8c7422bf3a221948.js
메시지: 개체가 필요합니다.
줄: 813
문자: 5
코드: 0
URI: Kakao Account
메시지: 'fn’은(는) null 이거나 개체가 아닙니다.
줄: 7
문자: 16811
코드: 0
URI: https://auth.kakao.com/assets/module/oauth-kakao-accounts-0db02592bdcdfeea346cc9485442474e.js