c# - 在 WinForms C# 中使用 WhatsAPINet 发送 WhatsApp 的密码错误

标签 c# visual-studio api whatsapp

我正在考虑创建一个 Windows 窗体 C# 应用程序(在 Windows 7、Visual Studio 2012、.NET Framework 4.5 中),并且我想使用任何 WhatsApp API 来发送消息。

我发现了 PHP 接口(interface)的 .NET 分支 WhatsAPI for PHP作者:Dídac Pérez Parera: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。这是 Android 4.0。

有什么建议吗?

最佳答案

关于c# - 在 WinForms C# 中使用 WhatsAPINet 发送 WhatsApp 的密码错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17360190/

相关文章:

api - Rest API UPDATE/DELETE - 检查资源是否存在?

json - 我应该在客户端验证 API 响应吗?

api - 如何使用 Github content api 创建或更新文件

c# - 是否可以使用 C# 隐藏特定的桌面图标?

visual-studio - 我应该部署中性应用程序包还是分别部署 x86、x64、ARM?

c# - 如何在 asp.net Visual Studio 中以 Web 表单显示图像?

asp.net - 自动完成 ="off"不适用于 Google Chrome

c# - 使用 Azure 网站进行系统.诊断.跟踪

c# - 当我在另一个选项卡中执行操作时,asp.net 会加载到第一个选项卡

c# - EF Core 到 Mysql 表绑定(bind)