Search code examples
google-plusaccess-token

How to make authorize request with Google Plus Social Graph


I am working on PHP application, which communicates with Google Plus. For getting information about people in circles I send request to this link: https://plus.google.com/u/0/_/socialgraph/lookup/visible?o=%5Bnull,null,%22GOOGLE_USER_ID%22%5D&rt=j and it retrieves me list of people in circles for specific user.

In my application I want to check for each user in my friend list (person in circle), if he/she has me also in circles, which means we are friends. But if person has blocked to list people in circles for public, then I get empty array in response despite he/she is my friend. So I would like to know, how to send with this link authorized request. For example how to include there access token.

Because now it shows only public data and it acts like I am not logged in.


Solution

  • Use: https://developers.google.com/+/api/latest/people/list and ask the user to sign-in then you'll be able to get their consent and retrieve the list of people they're following.