[英]Getting user information issue in Botman studio
I'm using botman studio and facebook driver with facebook Api graph 8.0 and I'm trying to get user information by using:我将 botman studio 和 facebook 驱动程序与 facebook Api graph 8.0 一起使用,我试图通过以下方式获取用户信息:
$botman->hears('GET_START', function ($bot) {
$user = $bot->getUser();
$firstname = $user->getFirstname();
$bot->reply($firstname); });
but no i get this error:但不,我得到这个错误:
(#3) Application does not have the capability to make this API call. (#3) 应用程序没有进行此 API 调用的能力。
Can any one help me with this I would be grateful.谁能帮我解决这个问题,我将不胜感激。
Try use this code you have a few mistakes尝试使用这段代码你有一些错误
$botman->hears('code', function ($bot) {
$user = $bot->getUser();
$firstname = $user->getFirstName();
$lastname = $user->getLastName();
$userId = $user->getId();
$bot->reply($firstname . ' ' . $userId);});
it's should work它应该工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.