1
Answer

Use of Whatapp API

Kundan  Jha

Kundan Jha

9y
673
1
 
We are Getting Login Failed  Message with Following Codes...
 
 -----------------------------------------------------------------------------------------------------------------------------------------------------------
private void button1_Click(object sender, EventArgs e)
{
string from = "919891840958";
string to = textBox1.Text;
string messes = textBox2.Text;
WhatsApp wa = new WhatsApp(from, "fHZxi8lKdNuhS5jItAlR1aG0xOY=", "itsme", false, false);
wa.OnConnectSuccess += () =>
{
MessageBox.Show("Connected to Whatsapp......");
wa.OnLoginSuccess += (Phone,data) =>
{
wa.SendMessage(to, messes);
MessageBox.Show("Message Sent....");
};
wa.OnLoginFailed += (data) =>
{
MessageBox.Show("Login failed ..... : {0}",data);
};
wa.Login();
};
wa.OnConnectFailed += (ex) =>
{
MessageBox.Show("Connection Failed...", ex.StackTrace);
};
wa.Connect();
 
Answers (1)