0

DotNetOpenAuth を使用して Google Latitude にアクセスするコード サンプルはありますか?

consumer.PrepareAuthorizedRequest で内部例外を取得する

System.ThrowHelper.ThrowKeyNotFoundException() で System.Collections.Generic.Dictionary`2.get_Item(TKey キー) で DotNetOpenAuth.Samples.OAuthConsumerWpf.InMemoryTokenManager.GetTokenSecret(文字列トークン) で F:\GoogleLatitude\DotNetOpenAuth-3.4.5.10202\ Samples\OAuthConsumerWpf\InMemoryTokenManager.cs: 35 行目 c:\Users\andarno\git\dotnetopenid\src\DotNetOpenAuth\OAuth\ChannelElements\OAuthChannel.cs: 401 行目の DotNetOpenAuth.OAuth.ChannelElements.OAuthChannel.SignatureCallback(ITamperResistantProtocolMessage メッセージ)

4

1 に答える 1

0

トークン マネージャーにコンシューマーまたはトークン シークレットを保存していないようです。これらのシークレットを永続的に保存しないため 、サンプル専用の InMemoryTokenManager を使用しているようです。

InMemoryTokenManager を使用している場合でも、このメソッドが例外をスローしないように、コンシューマ キー、コンシューマ シークレット、およびトークンとシークレットで GoogleConsumer が使用しているインスタンスを事前にプログラムしてください。

于 2010-08-13T13:30:13.960 に答える