Open ghost opened 9 years ago
what i supposed to do with that sir ? This is my code sir . can you help me sir ?
protected void btnSend_Click(object sender, EventArgs e) { string from = "+639061714515"; string to = txtTo.Text; string msg = txtMessage.Text;
WhatsApp wa = new WhatsApp(from, "EXWzzq2kmx6OTM10IBULrZ57/xg=", "Ej", false, false);
wa.OnConnectSuccess += () =>
{
MessageBox("Connected to whatsapp...");
wa.OnLoginSuccess += (phoneNumber, data) =>
{
wa.SendMessage(to, msg);
MessageBox("Message Sent...");
};
wa.OnLoginFailed += (data) =>
{
MessageBox("Login Failed:");
};
wa.Login();
};
wa.OnConnectFailed += (ex) =>
{
MessageBox("Connection Failed...");
};
wa.Connect();
}
public void MessageBox(string MessageBox) {
Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message Box", "<script language='javascript'>alert('" + MessageBox + "')</script>");
}
}
}
https://github.com/mgp25/Chat-API-NET