我正在考虑创建一个 Windows Forms C# 应用程序(在 Windows 7、Visual Studio 2012、.NET Framework 4.5 中)并且我想使用任何 WhatsApp API 来发送消息。
我找到 了 Dídac Pérez Parera的 PHP 接口WhatsAPI for PHP的这个 .NET 分支: https ://github.com/perezdidac/WhatsAPINet
我有这个测试代码:
string nickname = "WhatsAPI Test";
// 34 = Country Code
// 6xxyyzzmm = mobile number
string sender = "346xxyyzzmm"; // Mobile number with country code (but without + or 00)
string imei = "MY IMEI ANDROID THAT I GET USING *#06#"; // MAC Address for iOS IMEI for other platform (Android/etc)
var wa = new WhatsApp(sender, imei, nickname, true);
string countrycode = sender.Substring(0, 2);
string phonenumber = sender.Remove(0, 2);
if (!WhatsRegister.ExistsAndDelete(countrycode, phonenumber, imei))
{
PrintToConsole("Wrong Password");
return;
}
我测试了,但我总是得到“密码错误”
在我的手机中,我已经安装了 Whatsapp。这是安卓4.0。
有什么建议吗?