callback.php
Facebookページのコードはこちら。
ポスト メソッドの応答 ($updates 変数) を処理するにはどうすればよいですか?
if ($method == 'GET' && $_GET['hub_mode'] == 'subscribe' &&
$_GET['hub_verify_token'] == VERIFY_TOKEN)
{
echo $_GET['hub_challenge'];
}
else if ($method == 'POST') {
$updates = json_decode(file_get_contents("php://input"), true);
//what to do here.
error_log('updates = ' . print_r($updates, true));
}