Title: Fatal Error curl_init() Function
Last modified: March 10, 2021

---

# Fatal Error curl_init() Function

 *  [azariosays](https://wordpress.org/support/users/azariosays/)
 * (@azariosays)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-curl_init-function/)
 * When trying to post an article. I’m getting a few errors after posting. The plugin
   isn’t working currently either, but here’s the main error:
 * `Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/
   rhhpxlmy/public_html/wp-content/plugins/twitter-auto-publish/api/twitteroauth.
   php on line 759`
 * Here’s the full code on line 759:
 *     ```
       // configure curl
           $c = curl_init();
           switch ($this->request_settings['method']) {
             case 'GET':
               if (isset($this->request_settings['querystring']))
                 $this->request_settings['url'] = $this->request_settings['url'] . '?' . $this->request_settings['querystring'];
               break;
             case 'POST':
               curl_setopt($c, CURLOPT_POST, true);
               if (isset($this->request_settings['postfields']))
                 $postfields = $this->request_settings['postfields'];
               else
                 $postfields = array();
   
               curl_setopt($c, CURLOPT_POSTFIELDS, $postfields);
               break;
             default:
               if (isset($this->request_settings['postfields']))
                 curl_setopt($c, CURLOPT_CUSTOMREQUEST, $this->request_settings['postfields']);
           }
       ```
   
 * Please let me know your thoughts or if you’ve seen this error before and thanks!

The topic ‘Fatal Error curl_init() Function’ is closed to new replies.

 * ![](https://ps.w.org/twitter-auto-publish/assets/icon-128x128.jpg?rev=1790484)
 * [WP Twitter Auto Publish](https://wordpress.org/plugins/twitter-auto-publish/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/twitter-auto-publish/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/twitter-auto-publish/)
 * [Active Topics](https://wordpress.org/support/plugin/twitter-auto-publish/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/twitter-auto-publish/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/twitter-auto-publish/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [azariosays](https://wordpress.org/support/users/azariosays/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-curl_init-function/)
 * Status: not resolved