我正在使用DotNetOpenAuth.dll来获取用户ID,但我不知道如何发送签名的OAuth请求谷歌需要:
http://code.google.com/intl/it-IT/chrome/webstore/docs/check_for_payment.html
示例仅显示java代码
感谢您的帮助
答案 0 :(得分:0)
转到http://www.dotnetopenauth.net/并阅读文档,您应该找到所需的一切。
编辑: 我不确定这是否正确,但这是c#
中的一些示例代码var serviceProvider = new ServiceProviderDescription();
var tokenManager = new TokenManager(); //make an implementation of IConsumerTokenManager
var oauth = new WebConsumer(serviceProvider, tokenManager); //instanciate an consumer
var user = new User(); //User class contains an implementation of getFederatedIdentity()
var url = new Uri(string.Format(SERVER_URL,APP_ID,HttpUtility.HtmlEncode(user.getFederatedIdentity())));//create the url
var response = oauth.PrepareAuthorizedRequestAndSend(
new MessageReceivingEndpoint(url, HttpDeliveryMethods.AuthorizationHeaderRequest), TOKEN); //Send the request
//do what you want with the response