moshaorui 12 ساعت پیش
والد
کامیت
3fb46ab249
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      app/Services/Smm/TwitterService.php

+ 4 - 0
app/Services/Smm/TwitterService.php

@@ -173,6 +173,10 @@ class TwitterService implements SmmPlatformInterface
         try {
             Log::info('curl 请求:'.$url);
             $ch = curl_init();
+
+            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 不验证对等证书
+            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);     // 不验证主机名
+
             $headers = array_merge([
                 'Authorization: Bearer ' . $this->access_token
             ], $headers);