To get current user's profile info in a 3-legged oauth environment, I used
this url and built an Authorization header like:
GET
"https://www-opensocial.googleusercontent.com/api/people/@me/@self"
String oauth =
oauthHelper.getAuthorizationHeader(contactsURL.toString(),
HTTPMethod.GET.toString(), oauthParameters);
httpRequest.addHeader(new HTTPHeader("Authorization", oauth));
URLFetchService fetcher =
URLFetchServiceFactory.getURLFetchService();
HTTPResponse httpResponse = fetcher.fetch(httpRequest);
How can this be done using 2-legged oauth. When I try this code,
getAuthorizationHeader throws an OAuthException.
Thanks,
Tom
--
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