【问题标题】:WhatsAPI (WhatsAPP) - Exception ErrorWhatsAPI (WhatsAPP) - 异常错误
【发布时间】:2016-01-24 05:41:56
【问题描述】:

我正在查看此代码:https://github.com/venomous0x/WhatsAPI

在页面上:/src/php/EXAMPLES.php

我进行了以下更改(我认为这是我需要修改的全部内容。我显然在此示例中使用了不同的 IMEI 号码和手机号码):

        $userPhone        = '447799999999';      # Telephone number including the country code without '+' or '00'.
        $userIdentity     = '98B898B898B8';      # This is tipically the IMEI number.
                                                 # If you are using an iOS device you should input your WLAN MAC address.
        $userName         = 'John Doe';          # This is the username displayed by WhatsApp clients.

        $destinationPhone = '447788888888';      # Destination telephone number including the country code without '+' or '00'.
                                                 # For groups: [phone number]-[group id].
        $debug = TRUE;
        $w->requestCode('sms', 'GB', 'en');
        $w->registerCode('123456');

但是在我的服务器上导航到这个 example.php 页面时,我收到以下错误:

致命错误:未捕获的异常 'Exception' 带有消息 'There was a 尝试请求代码时出现问题。在 /whatsapp/src/php/whatsprot.class.php:1174 堆栈跟踪:#0 /whatsapp/src/php/EXAMPLES.php(49): WhatsProt->requestCode('sms', 'GB', 'en') #1 {main} 抛出 /whatsapp/src/php/whatsprot.class.php 上 第 1174 行

我只是想知道我哪里出错了,有人能解释一下吗?谢谢

【问题讨论】:

标签: php whatsapp


【解决方案1】:

您在哪里实例化了 WhatsProt 类? 你需要使用这一行:

$w = new WhatsProt($userPhone, $userIdentity, $userName, $debug);

【讨论】:

  • 您还有其他代码吗? bcoz 过去 6 小时我只搜索 whatsapp php 代码:(
  • 给我发电子邮件 bibaswann.mail@gmail.com
【解决方案2】:

还要确保您拥有最新的 src 文件,它会不断更改,恕不另行通知,只需重新下载 src 文件并覆盖当前文件即可

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-06-22
    • 2013-10-22
    • 2015-02-27
    • 2017-03-31
    • 2020-08-21
    • 2013-12-15
    • 2012-07-06
    相关资源
    最近更新 更多