使用 Tweet# 获取用户的 5 个最新更新
我正在研究一种方法,可以让我提取我的公司在其 Twitter 帐户上发布的最新 5 篇帖子。
此 Web 应用程序的一个要求是,它将这些 Twitter 帖子在我们的网站中以“常规”HTML 形式呈现,因此排除使用 Twitter JavaScript 方法。
我发现了 Tweet#,一个公开 Twitter 命令的 C# 插件。这似乎是获取此信息的好方法,但我有一个问题。
我希望能够在不验证 Twitter 的情况下从 Twitter 获取这些更新。由于信息是公开的,我认为这会相当简单,但是我在 Tweet# 上遇到了问题,想要这样做。
我发现能够做到这一点的最接近的事情需要我使用 Twitter 登录/验证,然后提取 5 条最新的推文。像这样:
var twitter = FluentTwitter.CreateRequest()
.AuthenticateAs("UserName", "p@ssw0rd")
.Configuration.CacheForInactivityOf(60.Seconds())
.Statuses().OnUserTimeline().Take(5).AsJson();
我需要的是允许我指定用户 ID 来提取最近 5 条推文而无需身份验证。
I am working on a method that will allow me to pull in the 5 most recent posts that my company has made on it's Twitter account.
One requirement of this web application is that it present these twitter posts as "regular" html in our website, so using the Twitter javascript method is ruled out.
I have found Tweet#, a C# plugin that exposes the Twitter commands. This seems to be a nice way to pull this information but I have a question.
I would like to be able to pull these updates from Twitter without authenticating to Twitter. Since the information is publically available I would think this would be fairly simple, however I'm having a problem with Tweet# wanting to do this.
The closest thing I have found to be able to do this requires my to login/authenticate with Twitter and then pull the 5 most recent tweets. Like this:
var twitter = FluentTwitter.CreateRequest()
.AuthenticateAs("UserName", "p@ssw0rd")
.Configuration.CacheForInactivityOf(60.Seconds())
.Statuses().OnUserTimeline().Take(5).AsJson();
What I need is something that will allow my to specific the user id to pull the most recent 5 tweets from without authentication.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Tweet# 没有特别详细的记录。我认为这会起作用:
这类似于 Web 请求
...因此,如果其他所有方法都失败,您可以手动下载并 XML 解析该内容。
Tweet# isn't particularly well documented. I think this will work:
This is analogous to the web request
...so if all else fails, you could manually download and XML parse that content.