Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get the friend list using Google+ API OAuth 2.0
    primarykey
    data
    text
    <p>I am having signin with Google+ to retrieve the users basic profile info(Name, Urls, Location, Profile Picture). But I want to also retrieve the user-id of the users friend so that i can give him/her better suggestion of whom the user already know in my website.</p> <pre><code>$app_access_token = GetCH(); function GetCH(){ $ch = curl_init(); $pieces = explode(",", $_SESSION['access_token']); $piece = explode(":", $pieces[0]); $token = str_replace('"',"",$piece[1]); $url = "https://www.googleapis.com/oauth2/v1/userinfo?access_token=".$token; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETU`enter code here`RNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); if(substr($url,0,8)=='https://'){ curl_setopt($ch,CURLOPT_HTTPAUTH,CURLAUTH_ANY); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false); } $sendCH = curl_exec($ch); curl_close($ch); return $sendCH; }; if ($client-&gt;getAccessToken()){ $me = $plus-&gt;people-&gt;get('me'); $user_id = filter_var($me['id'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); $url = filter_var($me['url'], FILTER_VALIDATE_URL); $img = filter_var($me['image']['url'], FILTER_VALIDATE_URL); $name = filter_var($me['displayName'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); // The access token may have been updated lazily. $_SESSION['access_token'] = $client-&gt;getAccessToken(); } else { $authUrl = $client-&gt;createAuthUrl(); </code></pre> <p>}</p> <p>For More Information: <a href="https://developers.google.com/apis-explorer/#p/plus/v1/" rel="nofollow">https://developers.google.com/apis-explorer/#p/plus/v1/</a> But I am unable to figure how to get the friend list as an array from their API</p> <p>Thanks in Advance</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload