开发者

looking for code samples with Google Latitude and DotNetOpenAuth

开发者 https://www.devze.com 2023-01-11 14:16 出处:网络
Anyone have code samples accessing Google Latitude with DotNetOpenAuth? Getting an inner exception at consumer.PrepareAuthorizedRequest

Anyone have code samples accessing Google Latitude with DotNetOpenAuth?

Getting an inner exception at consumer.PrepareAuthorizedRequest

at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at DotNetOpenAuth.Samples.OAuthConsumerWpf.InMemoryTokenManager.GetTokenSecret(String token) in F:\GoogleLatitude\DotNetOpenAuth-3.4.5.10202\Samples\OAuthConsumerWpf\InMemoryTok开发者_StackOverflowenManager.cs:line 35 at DotNetOpenAuth.OAuth.ChannelElements.OAuthChannel.SignatureCallback(ITamperResistantProtocolMessage message) in c:\Users\andarno\git\dotnetopenid\src\DotNetOpenAuth\OAuth\ChannelElements\OAuthChannel.cs:line 401


It looks like you simply are not storing the consumer or token secret in your token manager. I see that you're using the InMemoryTokenManager, which is for samples only, since it doesn't persistently store these secrets.

Even if you're using the InMemoryTokenManager, be sure to preprogram the instance that the GoogleConsumer is using with your consumer key, consumer secret, and tokens and secrets in order for this method to not throw an exception.

0

精彩评论

暂无评论...
验证码 换一张
取 消