Last active
December 24, 2017 11:15
-
-
Save hamzahjamad/5dccd1415e207ad67a7ece6b1311d715 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// fb-bot-tutorial/app/Http/Controllers/WebhookController.php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class WebhookController extends Controller | |
{ | |
// this will verify the Facebook Messenger with our Laravel project | |
public function getWebhook(Request $request) | |
{ | |
//TODO | |
} | |
//whenever Facebook Messenger get message from the user, | |
//Facebook Messenger will send to our Laravel project here | |
public function postWebhook(Request $request) | |
{ | |
//TODO | |
} | |
//after we process the message on above, let send message to the user | |
//back in Facebook Messenger | |
protected function sendToFbMessenger($sender, $message) | |
{ | |
//TODO | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment