Php Facebook 2200回调验证失败

Php Facebook 2200回调验证失败,php,facebook,api,facebook-graph-api,Php,Facebook,Api,Facebook Graph Api,我想订阅特定Facebook页面的picture对象。为了做到这一点,我遵循这一点。我上传了PHP文件作为回调。代码如下: <?php /** * This is sample subscription endpoint for using Facebook real-time update * See http://developers.facebook.com/docs/api/realtime to addi

我想订阅特定Facebook页面的
picture
对象。为了做到这一点,我遵循这一点。我上传了PHP文件作为回调。代码如下:

<?php                                    
/**
 * This is sample subscription endpoint for using Facebook real-time update
 * See http://developers.facebook.com/docs/api/realtime to additional
 * documentation
 */

// Please make sure to REPLACE the value of VERIFY_TOKEN 'abc' with 
// your own secret string. This is the value to pass to Facebook 
//  when add/modify this subscription.
define('VERIFY_TOKEN', 'app_code_123');                                    
$method = $_SERVER['REQUEST_METHOD'];                             

// In PHP, dots and spaces in query parameter names are converted to 
// underscores automatically. So we need to check "hub_mode" instead
//  of "hub.mode".                                                      
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); 
  // Replace with your own code here to handle the update 
  // Note the request must complete within 15 seconds.
  // Otherwise Facebook server will consider it a timeout and 
  // resend the push notification again.
  error_log('updates = ' . print_r($updates, true));              
}
?>

我想订阅一个特定的Facebook页面,那么我应该在哪里或如何指定

首先必须使用HTTP POST方法,而不是发送“.&method=POST&…”

其次,您的服务器必须可以从internet访问


第三,您的服务器必须能够处理并发请求,因为facebook同时发送验证请求。

您读到了吗?当Facebook向你的回拨URL发出验证请求时,你的回拨是否肯定会通过
hub.challenge进行响应?@Igy我不知道。我完全遵循了教程。没有提到任何关于
集线器的问题。挑战
。我如何确定它是否正确?我指的是标记为“Subscription Verification”的部分:您是否验证了该部分是否正确发生?@Igy这就是我想知道的,我将如何验证回调是否正确处理了验证。因为,我找不到任何线索,我遵循一个教程。你能告诉我该做什么吗?
"message": "(#2200) callback verification failed: ",
      "type": "OAuthException",
      "code": 2200