Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Tweetsharp:从特定用户检索推文列表_C#_Asp.net_Tweetsharp - Fatal编程技术网

C# Tweetsharp:从特定用户检索推文列表

C# Tweetsharp:从特定用户检索推文列表,c#,asp.net,tweetsharp,C#,Asp.net,Tweetsharp,在TS官方文档、其他推文或图书馆的课程中找不到这一点;所以我想我应该问一下。如何使用Tweetsharp从特定用户检索最近的推文列表 您可以假设我正在使用一个帐户进行身份验证,该帐户跟踪我要检索的推文用户。我甚至可以使用用户自己的帐户进行身份验证。使用ListTweetsOnSpecifiedDusertimeline() 例如: var service = new TwitterService(ConsumerKey, ConsumerSecret); service.Authenticate

在TS官方文档、其他推文或图书馆的课程中找不到这一点;所以我想我应该问一下。如何使用Tweetsharp从特定用户检索最近的推文列表


您可以假设我正在使用一个帐户进行身份验证,该帐户跟踪我要检索的推文用户。我甚至可以使用用户自己的帐户进行身份验证。

使用ListTweetsOnSpecifiedDusertimeline()

例如:

var service = new TwitterService(ConsumerKey, ConsumerSecret);
service.AuthenticateWith(AccessToken, AccessTokenSecret);
var currentTweets = service.ListTweetsOnSpecifiedUserTimeline(screenName:"screen name", page:1, count:100);

更新版本中的方法略有不同。它现在叫 ListTweetsOnUserTimeline()

现在,它将通过如下方式传递选项:

  var currentTweets = service.ListTweetsOnUserTimeline(new ListTweetsOnUserTimelineOptions
                {
                    ScreenName = "yourTwitterHandle",
                    Count = 5,
                });

完全错过了这个方法。谢谢你,罗纳德!我们如何知道计数是小于还是大于100?@CanCeylan该数字表示页面大小。一页最多有100条记录。