Send messages with whatsapi.net?

浪子不回头ぞ 提交于 2019-11-28 09:04:52
    WhatsApp wa = new WhatsApp("your number", "your password", "pankaj", false, false);
    wa.OnConnectSuccess += () =>
    {
        Response.Write("connect");
        wa.OnLoginSuccess += (phno,data) =>
        {
            wa.SendMessage("to", "msg");
        };

        wa.OnLoginFailed += (data) =>
        {
            Response.Write("login failed"+data);
        };
        wa.Login();
    };
    wa.OnConnectFailed+= (ex)=>
    {
        Response.Write("connection failed");
    }

download installer for generate password https://github.com/mgp25/WART from this link

after that pass your mobile no and password which you got. and pass user detail like his no or msg in constructor in whatsapp object.

it will work for you. try with it.

user2177437

After the connect put the command to Login. I resolved this way:

me.connect(); 
me.login(null);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!