【问题标题】:Posting a tweet C#发布推文 C#
【发布时间】:2014-07-16 08:02:38
【问题描述】:

我正在尝试使用 TweetSharp 库发布推文,但抛出了 StackOverflowException。我无法解决这个问题。我该怎么办?错误出现在这一行:

servis.SendTweet(new SendTweetOptions { Status = textBox1.Text }); 

【问题讨论】:

  • 请显示更多您的代码。

标签: c# twitter stack-overflow tweetsharp


【解决方案1】:

将其分解并在调试器中单步执行(在string status = ... 行设置断点):

// if you don't get this far, the problem is elsewhere

// if it fails here, the problem is accessing the textbox value
string status = textBox1.Text;

// if it fails here, the problem is inside the tweetsharp library,
// and should be referred to the library authors, but indicating which
// step fails (constructor vs Status property vs Send method)
var msg = new SendTweetOptions();
msg.Status = status;
servis.SendTweet(msg);

【讨论】:

    猜你喜欢
    • 2012-07-17
    • 2014-08-23
    • 2013-10-20
    • 2013-03-17
    • 2021-04-11
    • 2012-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多