facebookads-api 通过 Lead() "Resolving timed out after 10518 milliseconds" 获取潜在客户时出现异常

facebookads-api exception on fetching lead via Lead() "Resolving timed out after 10518 milliseconds"

我正在使用最新的 facebookads api ver 2.5 和 PHP 用于 Leads Ad。我们已经设置了实时更新以通过 leadgenid 获取潜在客户。我们随机收到超时错误。

         $inputJSON = file_get_contents('php://input');
         $input = json_decode($inputJSON, true);
         .....
         //Extracting the leadgenid and passing it to fetchlead

         function fetchLead($leadid) {
          try { 
            $form = new Lead($leadid);
            return $form->read()->{LeadFields::FIELD_DATA}; //array
          }
          catch (Exception $e) {
            error_log($e->getMessage());
          }
         }

上面的代码运行良好,并向我们传递了潜在客户信息,除了有时我们会遇到诸如此类的超时错误。然而,在 csv 文件中找到了遗漏的线索。

10518 毫秒后解析超时

请建议我如何解决这个问题。

将脚本超时设置为更高的值后,此问题没有发生。标记它已解决。