简体   繁体   English

使用 Twitter API 获取受保护的推文

[英]Get protected tweets with Twitter API

At this point, most of you know that Twitter fixed the problem with Protected tweets not being protected at all.在这一点上,大多数人都知道 Twitter 解决了受保护的推文根本不受保护的问题。

I'm looking everywhere and have only found some links to oAuth for authentication.我到处找,只找到了一些指向 oAuth 的链接进行身份验证。 But what i can't find is a way to capture protected tweets.但是我找不到一种捕获受保护推文的方法。 To make the question a little bit simpler.让问题简单一点。 Can somebody help me with a bit of code to retrieve my own private tweets?有人可以帮我写一些代码来检索我自己的私人推文吗?

Situation (C# and/or Java will help me):情况(C# 和/或 Java 将帮助我):

My own tweets are protected and i would like to Fetch those protected tweets and put them in.. say: A text file.自己的推文受到保护,我想获取那些受保护的推文并将它们放入......比如说:一个文本文件。 What is the best way to achieve this?实现这一目标的最佳方法是什么?

Hope somebody can help.希望有人可以提供帮助。

Like the comment above said.就像上面的评论说的那样。 Tweetshark is the way to go. Tweetshark 是通往 go 的方式。

You will first need to make a twitter application.您首先需要创建一个 twitter 应用程序。 Then follow this documentation:然后按照这个文档:

http://tweetsharp.codeplex.com/documentation http://tweetsharp.codeplex.com/documentation

It will explain how to authenticate with Twitter with a mobile app, silverlight or a normal website.它将解释如何使用移动应用程序 silverlight 或普通网站对 Twitter 进行身份验证。 Pick correctly !选对了!

To get your tweets you simply need to use the TwitterService you used and do this:要获取您的推文,您只需使用您使用的TwitterService并执行以下操作:

List<TwitterStatus> lstTweets = service.ListTweetsOnHomeTimeline().ToList();

Hope this helps abit.希望这个对你有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM