gpt4 book ai didi

c# - 为什么 GetRequestToken 不起作用?

转载 作者:太空宇宙 更新时间:2023-11-03 14:24:17 24 4
gpt4 key购买 nike

我有以下无法编译的小片段:

using TweetSharp.Twitter.Fluent;

//...

var twitter = FluentTwitter.CreateRequest();
twitter.Authentication.GetRequestToken("...", "...");

...它给了我以下错误:

Main.cs(12,12): Error CS1061: Type `TweetSharp.Twitter.Fluent.IFluentTwitterAuthentication' does not contain a definition for `GetRequestToken'and no extension method `GetRequestToken' of type TweetSharp.Twitter.Fluent.IFluentTwitterAuthentication' could be found (are you missing a using directiveor an assembly reference?) (CS1061) (StackBot)

Which is strange because according to TweetSharp's website, that's supposed to be valid code.

Am I forgetting something or is there some other assembly I need to reference?

I'm using Mono 2.4 on Ubuntu 10.10 64-bit.


I may have found a clue here. Using the assembly browser, I have discovered that IFluentTwitterAuthentication has the following definition:

public abstract interface IFluentTwitterAuthentication : IFluentAuthentication
{
// Properties
public abstract IFluentTwitter Root { get; }
}

...这让我相信程序集有些不对劲。

最佳答案

他们的代码好像是:

var twitter = FluentTwitter.CreateRequest ()
.Authentication.GetRequestToken("...", "...");

这和你的完全不同:

var twitter = FluentTwitter.CreateRequest();
twitter.Authentication.GetRequestToken("...", "...");

关于c# - 为什么 GetRequestToken 不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4504743/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com