Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fetch a profile picture of a Google Plus account?

I'm kind of building a website and I want to allow Google login. I don't want my customers upload their profile pictures again to my website. I have some clue on how to do it with facebook, but how do I fetch a profile picture from a google plus account once the user has been authenticated via a Google account? Is there any API for this? If yes, kindly share.

like image 422
Janakiram Avatar asked Dec 05 '22 07:12

Janakiram


1 Answers

We can easily get it with plus client When plus client is connected i.e

if(plusClient.isConnected){

            plusClient.getCurrentPerson().getImage().getUrl();

}

It will provide you the url of the image.

like image 140
Kimmi Dhingra Avatar answered Apr 17 '23 06:04

Kimmi Dhingra