botman / driver-facebook

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

Handover Protocol #93

Closed metanite closed 3 years ago

metanite commented 5 years ago

Does botman support facebook handover protocol? I have seen this code in driver-facebook but i don't know how to use this.

` /**

If this is supported how do i use this? thank you

Astriel commented 4 years ago

Hey @metanite did you find a way to use it ?

Found the same function here. I think you have somehow to call the Facebook driver. Then the handover method. The ID will be the one of your page inbox by default.

You have to attach two parameters, the message and the sender I guess.

metanite commented 4 years ago

Yes, but i have to modify the code a little bit to support another target app id since it only uses the inbox page id.

xSoulRootx commented 3 years ago

Try in routes/botman.php

$botman->on('request_thread_control', function ($payload, $bot) { $bot->handover($bot->getMessage(), $bot); });

It`s work for me. PS: You must config in fb page settings.