Head over to developer.facebook.com and create an App
On your server, create a facebook webhook that will handle facebook calls. Then create a "leadgen" webhook on you App: https://developers.facebook.com/docs/graph-api/webhooks/v2.5
Head over to developer.facebook.com and create an App
On your server, create a facebook webhook that will handle facebook calls. Then create a "leadgen" webhook on you App: https://developers.facebook.com/docs/graph-api/webhooks/v2.5
| <?php | |
| namespace Mauris\Utility; | |
| class NricUtility | |
| { | |
| public static function validate($nric) | |
| { | |
| $nric = strtoupper($nric); | |
| if (strlen($nric) == 9) { | |
| $hash = self::checksum(substr($nric, 0, 8)); |
| <?php | |
| $challenge = $_REQUEST['hub_challenge']; | |
| $verify_token = $_REQUEST['hub_verify_token']; | |
| // Set this Verify Token Value on your Facebook App | |
| if ($verify_token === 'testtoken') { | |
| echo $challenge; | |
| } | |
| $input = json_decode(file_get_contents('php://input'), true); |
| <select name="nationality"> | |
| <option value="">-- select one --</option> | |
| <option value="afghan">Afghan</option> | |
| <option value="albanian">Albanian</option> | |
| <option value="algerian">Algerian</option> | |
| <option value="american">American</option> | |
| <option value="andorran">Andorran</option> | |
| <option value="angolan">Angolan</option> | |
| <option value="antiguans">Antiguans</option> | |
| <option value="argentinean">Argentinean</option> |