TweetSharp在Linux上失败,但在OSX上运行良好

时间:2014-01-15 18:04:20

标签: c# linux macos mono tweetsharp

我在OSX(10.8.5)上用Xamarin(mono)制作了一个命令行应用程序,它100%完美地工作。当我将app exe和所有其他dll二进制文件从Release构建目录scp到Linux VPS(CentOS 6.4)并在那里运行时,当TweetSharp尝试执行ListFollowers(ListFollowersOptions)方法时,我得到一个NullException。

我已将其缩小到Twitter服务ListFollowers(lfo),为字符串列表返回空值,但不知道原因。如果我在Linux上明确地给TweetSharp一个用户名字符串和消息,我可以发送DM,所以我确定我正确地进行了身份验证。它在我在OSX上尝试的时候都可以工作,所以我很困惑。我已经排除了速率限制,因为如果是这种情况,那么OSX版本也应该失败。在Linux发生故障后,OSX版本将始终如一地正常工作。

此外,我已经通过在所有这些之前从shell执行“mozroots --import”来确保我的所有HTTPS证书都是正确的。

这是有问题的代码块。任何提示或指示将不胜感激:

static List<string> GetFollowers (TwitterService twitter) {

        ListFollowersOptions lfo = new ListFollowersOptions ();
        var tcl = twitter.ListFollowers (lfo);
        List<string> followers = new List<string> ();

        foreach (TwitterUser tu in tcl)
            followers.Add (tu.ScreenName);

        return followers;
    }

0 个答案:

没有答案