3
這是Facebook的callback.php
頁面的代碼。
現在我該如何處理post方法響應($ 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));
}
給定的鏈接不再工作了! – abhinav 2014-11-21 21:17:30
@Abhinav嘿,夥伴,謝謝你讓我知道。該網站現在又起來了! – 2014-12-02 05:27:25