用戶通過oauth2認證後,得到了令牌。 那麼如何得到請求應該是在php中檢索用戶的gmail聯繫人列表?如何在用戶通過oauth2認證後抓取gmail聯繫人列表
這裏是我怎樣才能得到用戶的聯繫人列表中的oauth2
session_start();
require_once 'src/apiClient.php';
$client = new apiClient();
$client->setClientId('CLIENTID');
$client->setClientSecret('CLIENTSECRET');
$client->setRedirectUri('URI');
$client->setApplicationName("NAME");
$client->setScopes("http://www.google.com/m8/feeds/");
if (isset($_SESSION['access_token'])) {
$client->setAccessToken($_SESSION['access_token']);
} else {
$client->setAccessToken($client->authenticate());
}
$_SESSION['access_token'] = $client->getAccessToken();
print($_SESSION['access_token']);
那麼代碼?
謝謝
當您有精確的問題時,請閱讀API文檔併發布代碼。 – 2012-02-27 20:01:38
我在這裏閱讀http://code.google.com/apis/contacts/docs/poco/1.0/developers_guide.html,但找不到任何信息。我要編輯我的問題。 – 2012-02-27 21:06:55