Tweetinvi不起作用

时间:2017-01-04 08:01:35

标签: linux mono tweetinvi

我在Ubuntu os上使用mono develop。我从nuget下载了Tweetinvi lib。这曾经在windows上工作。

public static void Main (string[] args)
    {
        var appCredentials = new TwitterCredentials("AppCred", "AppCred");


        var authenticationContext = AuthFlow.InitAuthentication(appCredentials);

        Process.Start(authenticationContext.AuthorizationURL);

        string pinCode = Console.ReadLine();



        var userCredentials = AuthFlow.CreateCredentialsFromVerifierCode(pinCode, authenticationContext);


        Auth.SetCredentials(userCredentials);


        var firstTweet = Tweet.PublishTweet("Hello World!");


    }

现在我遇到了这个异常:未处理的异常: System.TypeLoadException:无法解析终端中带有标记01000015的类型。

我尝试了不同版本的Tweetinvi库,我得到了:System.TypeInitialization Exception,at

var authenticationContext = AuthFlow.InitAuthentication(appCredentials);

这在Windows的Xamarin Studio中运行良好,但我必须在Linux中执行此操作。我想我必须添加一个引用或其他内容,以便ubuntu可以打开firefox并启动身份验证过程。

0 个答案:

没有答案