使用API​​1.1和twitterizer 2.4.3获取我关注的新推文

时间:2015-01-20 10:04:35

标签: c# twitter

我提取由我创建的推文:

OAuthTokens tokens = (OAuthTokens)context.Session["OAuthTokens"];
string username ="my_name";
string APIBaseAddress = 
"https://api.twitter.com/1.1/statuses/user_timeline.json?     
                              screen_name=" + username+"&count=50";
Uri Uri = new Uri(APIBaseAddress);
WebRequestBuilder requestBuilder = 
                  new WebRequestBuilder(Uri, HTTPVerb.GET, tokens);
using (HttpWebResponse response = requestBuilder.ExecuteRequest())
     {
     System.IO.StreamReader rdr = new
                       System.IO.StreamReader(response.GetResponseStream());
     dynamic jSon = JsonConvert.DeserializeObject(rdr.ReadToEnd());
    }

如何获取我关注的人的新推文?

1 个答案:

答案 0 :(得分:0)

只需使用此网址:

https://api.twitter.com/1.1/statuses/home_timeline.json?count=50

而不是APIBaseAddress