php - Facebook Realtime API -
i believe have facebook realtime notifications set correctly don't receive notifications. ideas?
and here callback.php
define('verify_token', 'secret'); $method = $_server['request_method']; if ($method == 'get' && $_get['hub_mode'] == 'subscribe' && $_get['hub_verify_token'] == verify_token) { echo $_get['hub_challenge']; } else if ($method == 'post') { if ( isset( $_server['http_x_hub_signature'] ) ) { $post_body = file_get_contents("php://input"); if ($_server['http_x_hub_signature'] == "sha1=" . hash_hmac('sha1', $post_body, verify_token)) { $object = json_decode($post_body, true); file_put_contents('/path_to_folder/updates.txt', $object, file_append); } } }
i'm not getting , .txt file not created.
Comments
Post a Comment