示例#1
0
 /*最新评论*/
 public string comments_timeline(string userid, string passwd, string format)
 {
     OAuthClient _oauth = new OAuthClient();
     if (oAuth(userid, passwd, _oauth))
     {
         string url = "http://api.t.sina.com.cn/statuses/comments_timeline." + format;
         return _oauth.oAuthWebRequest(OAuthClient.Method.GET, url, String.Empty);
     }
     else
         return null;
 }
示例#2
0
 /*批量获取一组微博的评论数及转发数*/
 public string counts(string userid, string passwd, string format, string ids)
 {
     OAuthClient _oauth = new OAuthClient();
     if (oAuth(userid, passwd, _oauth))
     {
         string url = "http://api.t.sina.com.cn/statuses/counts." + format + "?ids=" + ids;
         return _oauth.oAuthWebRequest(OAuthClient.Method.GET, url, String.Empty);
     }
     else
         return null;
 }
示例#3
0
 /*发布一条微博信息*/
 public string statuses_update(string userid, string passwd, string format, string status)
 {
     OAuthClient _oauth = new OAuthClient();
     if (oAuth(userid, passwd, _oauth))
     {
         string url = "http://api.t.sina.com.cn/statuses/update." + format + "?";
         return _oauth.oAuthWebRequest(OAuthClient.Method.POST, url, "status=" + HttpUtility.UrlEncode(status));
     }
     else
         return null;
 }
示例#4
0
 /**********************************************************************************************
  *************************************微博访问接口*********************************************
  **********************************************************************************************
  **********************************************************************************************/
 /*获取单条ID的微博信息*/
 public string statuses_show(string userid, string passwd, string format, string id)
 {
     OAuthClient _oauth = new OAuthClient();
     if (oAuth(userid, passwd, _oauth))
     {
         string url = "http://api.t.sina.com.cn/statuses/show/" + id + "." + format;
         return _oauth.oAuthWebRequest(OAuthClient.Method.GET, url, String.Empty);
     }
     else
         return null;
 }