Twitter 是否可以使用TweetSharp发送包含超链接的推文?

Twitter 是否可以使用TweetSharp发送包含超链接的推文?,twitter,tweetsharp,Twitter,Tweetsharp,我在当前项目中使用TweetSharp,并尝试发送包含URL的推文 当我在推文发布后查看推文时,URL不会显示为超链接,而只是纯文本 我读到Tweetsharp支持实体,但从我所看到的情况来看,只有在从Twitter检索到一条tweet后,它才支持实体 我曾尝试在发送tweet时将链接包含为HTML,但这只会导致tweet根本不发送 这是我正在使用的代码: var service = new TwitterService(twitterApiKey, twitterApiSecret);

我在当前项目中使用TweetSharp,并尝试发送包含URL的推文


当我在推文发布后查看推文时,URL不会显示为超链接,而只是纯文本

我读到Tweetsharp支持实体,但从我所看到的情况来看,只有在从Twitter检索到一条tweet后,它才支持实体

我曾尝试在发送tweet时将链接包含为HTML,但这只会导致tweet根本不发送

这是我正在使用的代码:

 var service = new TwitterService(twitterApiKey, twitterApiSecret);
        service.AuthenticateWith(unencryptedToken, unencryptedSecret);

        model.Message = string.Concat(model.Message, " ", !string.IsNullOrEmpty(model.ShortenedUrl) ? model.ShortenedUrl : model.CurrentUrl);

        if (model.Image == null)
        {
            var tweet = service.SendTweet(new SendTweetOptions {Status = model.Message});

            if (tweet == null)
                return false;

        }
        else
        {
            using (var stream = new FileStream(model.Image.FileLocation, FileMode.Open))
            {
                var images = new Dictionary<string, Stream> {{"image", stream}};
                var tweetwithMedia = service.SendTweetWithMedia(new SendTweetWithMediaOptions
                    {
                        Status = model.Message,
                        Images = images
                    });

                if (tweetwithMedia == null)
                    return false;
            }
        }
        return true;
var-service=newtwitterservice(twitterApiKey,twitterApiSecret);
服务.AuthenticateWith(未加密的token,未加密的secret);
model.Message=string.Concat(model.Message,“,!string.IsNullOrEmpty(model.ShortenedUrl)?model.ShortenedUrl:model.CurrentUrl);
如果(model.Image==null)
{
var tweet=service.SendTweet(新的SendTweetOptions{Status=model.Message});
如果(tweet==null)
返回false;
}
其他的
{
使用(var stream=newfilestream(model.Image.FileLocation,FileMode.Open))
{
var images=新字典{{“image”,stream};
var tweetwithMedia=service.SendTweetWithMedia(新的SendTweetWithMediaOptions
{
状态=模型。消息,
图像=图像
});
如果(tweetwithMedia==null)
返回false;
}
}
返回true;
model.Message只是一个字符串

有人知道如何正确显示链接吗


干杯

“URL不会显示为超链接,而只是纯文本”-你能举个例子吗?@Fresh如果我在推特上发了任何带有say的内容。当人们查看它时,它将无法在twitter上点击。它只会显示为纯文本。