瀏覽代碼

社媒对接

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);