1 Star 0 Fork 35

程度/WEBQQ 4 CSharp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
FokiteCoreSelfInfo.cs 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
夏悸 提交于 2015-06-08 12:57 . init
using System;
namespace FokiteQQcore_http://fokite.com/
{
public partial class FokiteCore
{
/// <summary>
/// 获取最近联系人
/// </summary>
public Dictionary<String, Object> RecentContact()
{
var postdata = "{0}\"vfwebqq\":\"{1}\",\"clientid\":\"{2}\",\"psessionid\":\"{3}\"{4}";
postdata = String.Format(postdata,"{",Vfwebqq,Clientid,Psessionid,"}");
postdata = HttpUtility.UrlEncode(postdata, Encoding.UTF8);
postdata = String.Format("r={0}&clientid={1}&psessionid={2}", postdata,Clientid,Psessionid);
using (var sre = new StreamReader( CreateRequest("http://d.web2.qq.com/channel/get_recent_list2", postdata) ) )
{
postdata = sre.ReadToEnd();
dynamic jsonengine = new System.Web.Script.Serialization.JavaScriptSerializer().DeserializeObject(postdata);
return jsonengine["result"];
}
}
/// <summary>
/// 获取自己的信息
/// </summary>
/// <returns></returns>
public Dictionary<String, Object> SelfInfo()
{
var url = "http://s.web2.qq.com/api/get_self_info2?t={0}";
url = String.Format(url, getTime(DateTime.Now));
using (var sre = new StreamReader(CreateRequest(url, String.Empty)))
{
url = sre.ReadToEnd();
dynamic jsonengine = new JavaScriptSerializer().DeserializeObject(url);
return jsonengine["result"];
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/diycp/WEBQQ-4-CSharp.git
git@gitee.com:diycp/WEBQQ-4-CSharp.git
diycp
WEBQQ-4-CSharp
WEBQQ 4 CSharp
master

搜索帮助