2026, 새로운 도약을 시작합니다.

구글 소셜 로그인 관련(Google People API)

2023.jpg

간단하게 해결하는 방법 설명을 드리겠습니다.


수정 파일명
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 이상

첨부파일

2023.jpg (64.5 KB)
0회 2023-07-13 12:00
2023.zip (61.9 KB) 29회 2023-07-13 12:00
|

댓글 2개

감사합니다. ^^
쇼셜로그인 쉬우면서도 변경되어 어려웠는데 정확히 이해 했습니다. 감사합니다.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기
🐛 버그신고