2013-04-20 25 views
1

我在看这段代码:https://github.com/venomous0x/WhatsAPIWhatsAPI(的WhatsApp) - 异常错误

在页面:/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我的服务器上时,我收到以下错误:

Fatal error: Uncaught exception 'Exception' with message 'There was a problem trying to request the code.' in /whatsapp/src/php/whatsprot.class.php:1174 Stack trace: #0 /whatsapp/src/php/EXAMPLES.php(49): WhatsProt->requestCode('sms', 'GB', 'en') #1 {main} thrown in /whatsapp/src/php/whatsprot.class.php on line 1174

我只想知道我要出错的地方,谁能说出一些光?谢谢

+0

你好这里是代码? https://github.com/venomous0x/WhatsAPI – 2015-08-19 12:06:53

回答

1

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

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

你好代码在哪里? https://github.com/venomous0x/WhatsAPI – 2015-08-19 12:06:46

+0

问开发商 – 2015-08-19 12:17:43

+0

你有其他的代码吗? bcoz过去6小时我只搜索whatsapp php代码:( – 2015-08-19 12:21:06

0

也确保您有最新的src文件时,它保持,恕不另行通知更改只是重新下载SRC文件并覆盖现有