2011-08-27 5 views
2
https://www.google.com/m8/feeds/groups/default/full/6 

시스템 그룹 내 연락처의 모든 연락처 목록을 반환해야하지만 "그룹을 찾을 수 없음"이라고 표시되어야합니다.Google 연락처 API가 시스템 그룹을 반환하지 않음

모든 연락처 그룹 목록을 요청하면 사용자 정의 그룹 만 반환됩니다.

모든 연락처 목록을 요청하면 모든 연락처가 나에게 제공되지만 사용자 정의 그룹이 아니라면 어떤 그룹에 있는지 알 수 없습니다.

내가 뭘 잘못하고 있는지에 대한 아이디어가 있습니까?

편집 : 는 여기

https://accounts.google.com/o/oauth2/auth?client_id=819467938951.apps.googleusercontent.com&redirect_uri=http://subomain.website.com/back.html&scope=https://www.google.com/m8/feeds/&response_type=code 

재 내가 V = 2를 설정하면이 (http://php.dzone.com/news/execute-http-post-using-php-cu에서 수정) back.html의 소스

<?php 
$token = $_GET["code"]; 

$url = 'https://accounts.google.com/o/oauth2/token'; 
$fields = array(
     'code'=>urlencode($token), 
     'client_id'=>urlencode("819467938951.apps.googleusercontent.com"), 
     'client_secret'=>urlencode("secret key"), 
     'redirect_uri'=>urlencode("http://subdomain.website.com/back.html"), 
     'grant_type'=>urlencode("authorization_code") 
    ); 

//url-ify the data for the POST 
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } 
rtrim($fields_string,'&'); 

//open connection 
$ch = curl_init(); 

//set the url, number of POST vars, POST data 
curl_setopt($ch,CURLOPT_URL,$url); 
curl_setopt($ch,CURLOPT_POST,count($fields)); 
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 


//execute post 
$result = curl_exec($ch); 

//close connection 
curl_close($ch); 

$result=json_decode($result, true); 

$access_token = $result["access_token"]; 

print_r(file_get_contents("https://www.google.com/m8/feeds/groups/default/full/6?access_token=" . $access_token)); 
?> 
+0

하나는 당신이 우리와 함께 작동 할 코드를 제공하지 않습니다 잘못하고있는 것) – ty812

+0

추가하는 코드 : –

답변

4

retrieve all contacts from a group in PHP

입니다 시스템 그룹이 드디어 나타났습니다!

https://www.google.com/m8/feeds/groups/default/full?v=2 

는 설정 그룹 = 그룹 URL 그룹의 연락처를 얻으려면

https://www.google.com/m8/feeds/contacts/default/full?v=2&group=http://www.google.com/m8/feeds/groups/default/base/6 
+0

또는'GData-Version : 3.0'과 같이 2.0보다 크거나 같은 값으로 헤더'GData-Version'을 설정할 수 있습니다. – Vilinkameni

관련 문제