You owe me a beer.. ;)

URL feedUrl = new 
URL("https://www.google.com/m8/feeds/contacts/default/full?xoauth_requestor_id=
...");

ContactQuery query = new ContactQuery(feedUrl);
ContactsService contactsService = new ContactsService("myapp");
GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey(CONSUMER_KEY);
oauthParameters.setOAuthConsumerSecret(CONSUMER_SECRET);
oauthParameters.setOAuthType(OAuthParameters.OAuthType.TWO_LEGGED_OAUTH);
OAuthSigner signer = new OAuthHmacSha1Signer();
oauthParameters.setScope("https://www.google.com/m8/feeds/contacts/";);
contactsService.setOAuthCredentials(oauthParameters, signer);
contactsService.setOAuthCredentials(oauthParameters, new 
OAuthHmacSha1Signer());

ContactFeed results = contactsService.getFeed(query, ContactFeed.class);

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html

Reply via email to