git上有很多类似的项目,但大多都是python和js的,为了便于.Net windows平台的使用,我重构了一个.Net版本的,已整理开源
https://github.com/leestar54/WebWeChatAPI.Net
WebWeChat.Net基于.Net平台C#的微信网页版API
近期更新实现API基础功能
开发运行环境vs2015+.net4.0 framework
依赖项json.net 4.0
Feature最小依赖,使用简单
支持同步、基于事件回调的异步方法
对象间隔离,可以实例化无数客户端
简单使用具体内容见源码,此处仅简单说明
static void Main(string[] args) { Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; client = new Client(); qrForm = new QrCodeForm(); client.ExceptionCatched += Client_ExceptionCatched; ; client.GetLoginQrCodeComplete += Client_GetLoginQrCodeComplete; ; client.CheckScanComplete += Client_CheckScanComplete; ; client.LoginComplete += Client_LoginComplete; ; client.BatchGetContactComplete += Client_BatchGetContactComplete; ; client.GetContactComplete += Client_GetContactComplete; ; client.MPSubscribeMsgListComplete += Client_MPSubscribeMsgListComplete; ; client.LogoutComplete += Client_LogoutComplete; ; client.ReceiveMsg += Client_ReceiveMsg; ; client.DelContactListComplete += Client_DelContactListComplete; ; client.ModContactListComplete += Client_ModContactListComplete; Console.WriteLine("小助手启动"); client.Start(); qrForm.ShowDialog(); Console.ReadLine(); client.Close(); Console.ReadLine(); client.Logout(); }