我知道它在這裏有超過9000個問題,但我仍然無法捕捉它。 爲什麼我的代碼對這個密碼或其他東西感覺不好?通過.net應用程序的WhatsApp消息
string sender = "my phone with country code (38)";
string password = "fresh token given with WART";
string nickname = "some nick here";
string target = "another phone with similar code";
WhatsApp wa = new WhatsApp(sender, password, nickname, true, true);
wa.OnConnectSuccess +=() =>
{
Console.WriteLine("Connected");
wa.OnLoginSuccess += (phoneNumber, data) =>
{
Console.WriteLine("Connection success!");
wa.SendMessage(target, "testing C# Api,sent via C#");
Console.WriteLine("Message sent!");
};
wa.OnLoginFailed += (data) =>
{
Console.WriteLine("Login failed: {0}", data);
};
wa.Login();
};
wa.OnConnectFailed += (ex) =>
{
Console.WriteLine("Connect failed: {0}", ex.StackTrace);
};
wa.Connect();
和這裏來登錄失敗:未經授權。 如果你有其他的工作.cs在這裏或一些建議,請與我分享。 快樂編碼
如果您正在使用_exactly_與其他人使用_exccesfully_相同的代碼:可能是whatsapp公司阻止它。 – RvdK