我已经构建了一个带有“使用 google 登录”功能的 windows phone 7 应用程序。Google 库与 windows phone 运行时不兼容,所以我选择 RestSharp。
该应用程序已成功接收到来自 Google 的验证码,下一步是将验证码交换为访问令牌和刷新令牌。在这里我遇到了一些问题。
var request = new RestRequest(this.TokenEndPoint, Method.POST);
request.AddParameter("code", code);
request.AddParameter("client_id", this.ClientId);
request.AddParameter("client_secret", this.Secret);
request.AddParameter("redirect_uri", "http://localhost");
request.AddParameter("grant_type", "authorization_code");
client.ExecuteAsync<???>(request, (response) =>
{
var passIn = response;
}); // how to use this method?
我不确定如何使用该client.ExecuteAsync<T>
方法(或任何其他方法会有所帮助)来获得 Google 的回复。是否有任何其他代码预先要求我使用这种方法?有谁能够帮助我?