8
我想实现的whatsAPI但我总是得到这个错误
“有试图请求代码有问题”。
这是在我的控制台显示完整的错误:WhatsApp的API请求代码不执行,而不是返回请求的代码
####start of error notice#####
[12-Mar-2013 22:44:59] PHP Notice: Undefined property: stdClass::$reason in /Applications/MAMP/htdocs/whatsapp/test/whatsprot.class.php on line 1268
[12-Mar-2013 22:44:59] PHP Fatal error: Uncaught exception 'Exception' with message 'There was a problem trying to request the code.' in /Applications/MAMP/htdocs/whatsapp/test/whatsprot.class.php:1269
Stack trace:
#0 /Applications/MAMP/htdocs/whatsapp/test/test.php(36): WhatsProt->checkCredentials()
#1 {main}
thrown in /Applications/MAMP/htdocs/whatsapp/test/whatsprot.class.php on line 1269
####end of error notice#####
这是我对初始化类
$userPhone = '8801770648732';
$userIdentity = '352264050503669';
$userName = 'shishir';
$destinationPhone = '8801713206053';
$debug = TRUE;
$whatsapp = new WhatsProt($userPhone, $userIdentity, $userName, $debug);
并为请求requestCode
$service_type = "sms";
$country_code = "BD";
$language_code = "en";
$request_code = $whatsapp->requestCode($service_type, $country_code, $language_code);
凭据每当它陷入$whatsapp->requestCode
那个错误。
我不确定我做错了什么。
任何人都可以帮助我吗?
我也需要这个问题的答案 – 2016-04-15 11:44:04