구글 소셜 로그인 관련(Google People API) 정보
구글 소셜 로그인 관련(Google People API)
첨부파일
테스트한 버전5.3
호환 가능 버전5.3 이상
본문
간단하게 해결하는 방법 설명을 드리겠습니다.
수정 파일명
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
도움이 되었으면 합니다.
추천
1
1
댓글 전체
감사합니다. ^^
쇼셜로그인 쉬우면서도 변경되어 어려웠는데 정확히 이해 했습니다. 감사합니다.