我提取由我创建的推文:
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());
}
如何获取我关注的人的新推文?
答案 0 :(得分:0)
只需使用此网址:
https://api.twitter.com/1.1/statuses/home_timeline.json?count=50
而不是APIBaseAddress