구글 소셜 로그인 관련(Google People API)
간단하게 해결하는 방법 설명을 드리겠습니다.
수정 파일명
plugin/social/Hybrid/Providers/Google.php
>> URL 변경
$response = $this->api->api("https://www.googleapis.com/plus/v1/people/me");
->
$response = $this->api->api("https://www.googleapis.com/userinfo/v2/me");
>> 프로필 이름 받아오는 부분 수정
$this->user->profile->displayName = (property_exists($response, 'displayName')) ? $response->displayName : "";
->
$this->user->profile->displayName = (property_exists($response, 'name')) ? $response->name : "";
>> 프로필 사진
이부분은 필요가 없어서 하지 않았습니다.
기존에 image에서 picture로 변경이 되었습니다.
$response->image -> $response->picture
도움이 되었으면 합니다.
버전 정보
테스트한 버전
5.3
호환 가능 버전
5.3 이상
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기
댓글 2개