【问题标题】:TweetSharp doesn't post tweets with comma (%2C) in URLTweetSharp 不在 URL 中发布带有逗号 (%2C) 的推文
【发布时间】:2018-04-09 08:15:09
【问题描述】:

我在 VB.NET 控制台应用程序中使用 TweetSharp (https://www.nuget.org/packages/TweetSharp/) 发布推文:

msg = "TEST https://idioms.thefreedictionary.com/devil+take+the+hindmost%2c+the"
service.SendTweet(New SendTweetOptions With {.Status = msg })

除非 URL 包含逗号,否则一切正常。在这种情况下,不会发布任何内容(没有错误,只是没有任何反应)。如果我从上面的示例中删除 %2c,则推文发布正常。

如果我手动发布相同的推文(来自网站 twitter.com),一切正常。

【问题讨论】:

  • 如果将 %2 替换为逗号(pre-http 编码)会失败吗?
  • 感谢您的快速答复。确实,如果我不对逗号进行编码,它就可以工作。但为什么?那么其他标点符号(点、分号等)呢?无论如何,空格显然需要编码。
  • 我的猜测是 TweetSharp 有自己的 HTTP 编码。

标签: .net vb.net tweets tweetsharp


【解决方案1】:

问题解决了。事实证明,如果不编码逗号,一切正常:

msg = "TEST https://idioms.thefreedictionary.com/devil+take+the+hindmost,+the"
service.SendTweet(New SendTweetOptions With {.Status = msg })

仍然不确定这是标准要求还是TweetSharp 的错误。以及我应该如何处理其他标点符号。

【讨论】:

    猜你喜欢
    • 2013-10-22
    • 2013-06-11
    • 2019-10-02
    • 1970-01-01
    • 2011-05-30
    • 2013-02-13
    • 1970-01-01
    • 2019-11-05
    • 1970-01-01
    相关资源
    最近更新 更多