botman / driver-facebook

BotMan Facebook Messenger Driver
MIT License
71 stars 73 forks source link

Facebook Graph api version 3.0 support ended #107

Open PetrGorchanuk opened 4 years ago

PetrGorchanuk commented 4 years ago

Hello

Can't get user data

Also issue with bot requests /app/vendor/botman/driver-facebook/src/FacebookDriver.php:516 Error sending payload: (100) No matching user found

Due to the fact that support for version 3.0 facebook graph api, which is currently used in the driver is over

https://developers.facebook.com/docs/graph-api/changelog/version3.0/

Release: May 1, 2018 | Available until: July 28, 2020

vesper8 commented 4 years ago

So does this just mean it needs to get updated to a later version? v4? could it continue to function if that was updated?

freescout-helpdesk commented 3 years ago

Experiencing this issue only receivesFiles().

By som reason in https://github.com/botman/botman/blob/2.0/src/BotMan.php#L241 it uses NullDriver instead of Facebook:

$user = $this->getDriver()->getUser($this->getMessage());
freescout-helpdesk commented 3 years ago

Fixed by loading drivers:

                \BotMan\BotMan\Drivers\DriverManager::loadDriver(\BotMan\Drivers\Facebook\FacebookDriver::class);
               // Also need to be loaded
                \BotMan\BotMan\Drivers\DriverManager::loadDriver(\BotMan\Drivers\Facebook\FacebookAudioDriver::class);
                \BotMan\BotMan\Drivers\DriverManager::loadDriver(\BotMan\Drivers\Facebook\FacebookFileDriver::class);
                \BotMan\BotMan\Drivers\DriverManager::loadDriver(\BotMan\Drivers\Facebook\FacebookImageDriver::class);
                \BotMan\BotMan\Drivers\DriverManager::loadDriver(\BotMan\Drivers\Facebook\FacebookLocationDriver::class);
                \BotMan\BotMan\Drivers\DriverManager::loadDriver(\BotMan\Drivers\Facebook\FacebookLocationDriver::class);
                \BotMan\BotMan\Drivers\DriverManager::loadDriver(\BotMan\Drivers\Facebook\FacebookVideoDriver::class);