Esempio n. 1
1
        private static void Main(string[] args)
        {
            var tmpEncoding = Encoding.UTF8;
            System.Console.OutputEncoding = Encoding.Default;
            System.Console.InputEncoding = Encoding.Default;
            string nickname = "WhatsAPI Test";
            string sender = "3526********"; // Mobile number with country code (but without + or 00)
            string password = "******";//v2 password
            string target = "316********";// Mobile number to send the message to

            WhatsApp wa = new WhatsApp(sender, password, nickname, true);

            wa.Connect();
            wa.Login();
            wa.sendNickname(nickname);
            wa.Disconnect();

            wa.PresenceSubscription(target);
            wa.GetStatus(target);

            ProcessChat(wa, "");

            Console.ReadKey();
        }