How to send a whatsapp message in asp.net mvc 5 can you please share me your answers.
I am already create in c# but that the coding also not working properly if i run a program it always shows like connection failed not authorized. i declare a coding below..
private void button1_Click(object sender, EventArgs e)
{
string from = "xxxxxxxxxxmy Mobile Number";
string TO = textBox1.Text;
string Message = textBox2.Text;
WhatsApp wa = new WhatsApp(from, "xxxxxxxxxxxxxxxxxxx", "Thamizh, false, false");
wa.OnConnectSuccess += () =>
{
MessageBox.Show("Connected to Whatsapp");
wa.OnLoginSuccess += (PhoneNumber, data) =>
{
wa.SendMessage(TO ,Message);
MessageBox.Show("Message send successfully");
};
wa.OnLoginFailed += (data) =>
{
MessageBox.Show("Login Failed :{0}", data);
};
wa.Login();
};
wa.OnConnectFailed += (ex) =>
{
MessageBox.Show("Connection Failed");
};
wa.Connect();
}