테스트 사이트 - 개발 중인 베타 버전입니다

구글 소셜 로그인 관련(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


도움이 되었으면 합니다.

댓글 작성

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

로그인하기

댓글 2개

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

게시판 목록

그누보드5 플러그인

그누보드 호환이거나 독립적으로 실행되는 플러그인을 소개합니다.
글쓰기
🐛 버그신고