I'm new to the GData API and am having an issue exchanging my one time
token for a session token. This is the code I have, written in C# :
Service gService;
GAuthSubRequestFactory authFactory;
String oneTimeToken = Request.QueryString["token"];
String sessionToken;
Response.Write("OTT = " + oneTimeToken + "<br />");
authFactory = new GAuthSubRequestFactory("cp", "Test App");
sessionToken = AuthSubUtil.exchangeForSessionToken(oneTimeToken,
null);
authFactory.Token = sessionToken;
gService = new Service("cp", authFactory.ApplicationName);
gService.RequestFactory = authFactory;
Specifically, I'm trying to access contact data, but I figure this
question is general enough to apply anywhere.
I can't figure what I'm doing wrong. I get a oneTimeToken, for
certain, but when I call exchangeForSessionToken it returns null. If
I need to clarify with more code or anything, I certainly can.
Thanks!