开发者

DotNetOpenAuth TwitterConsumer "Failure looking up secret for consumer or token."

开发者 https://www.devze.com 2023-01-04 01:21 出处:网络
Using DotNetOpenAuth 3.4.3.10103 when i call: public static XDocument GetUpdates(ConsumerBase twitter, string accessToken) {

Using DotNetOpenAuth 3.4.3.10103 when i call:

public static XDocument GetUpdates(ConsumerBase twitter, string accessToken) {
IncomingWebResponse response = twitter.PrepareAuthorizedRequestAndSend(GetFriendTimelineStatusEndpoint, accessToken);
return XDocument.Load(XmlReader.Create(response.GetResponseReader()));
}

I keep getting "Failure looking up secret for consumer or token." on PrepareAuthorizedRequestAndSend the access key is good and I can see it in d开发者_开发技巧ebug on the twitter.

Thoughts?


The ConsumerBase you've initialized and passed in needs to have an IConsumerTokenManager instance that has a consumer key and consumer secret set on it. Be sure you have that. The token manager must also know about the access token you've passed into PrepareAuthorizedRequestAndSend and know the associated access token secret.

0

精彩评论

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