This error occurs on the latest dev version of the module. It occurs even though curl is installed on the server(Ubuntu 10.10)
Failed to construct Facebook client API.: Facebook needs the CURL PHP extension. 0
Notice: Use of undefined constant CURLOPT_CONNECTTIMEOUT - assumed 'CURLOPT_CONNECTTIMEOUT' in fb_api_init() (line 372 of /var/www/sites/all/modules/fb/fb.module).
Notice: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed 'CURLOPT_RETURNTRANSFER' in fb_api_init() (line 372 of /var/www/sites/all/modules/fb/fb.module).
Notice: Use of undefined constant CURLOPT_TIMEOUT - assumed 'CURLOPT_TIMEOUT' in fb_api_init() (line 372 of /var/www/sites/all/modules/fb/fb.module).
Notice: Use of undefined constant CURLOPT_USERAGENT - assumed 'CURLOPT_USERAGENT' in fb_api_init() (line 372 of /var/www/sites/all/modules/fb/fb.module).
Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in fb_api_init() (line 379 of /var/www/sites/all/modules/fb/fb.module).
Notice: Use of undefined constant CURLOPT_SSL_VERIFYHOST - assumed 'CURLOPT_SSL_VERIFYHOST' in fb_api_init() (line 380 of /var/www/sites/all/modules/fb/fb.module).
Notice: Undefined property: stdClass::$canvas_name in fb_admin_page() (line 48 of /var/www/sites/all/modules/fb/fb.admin.inc).
Comments
Comment #1
krisjansen CreditAttribution: krisjansen commentedcheck your php.ini file and uncomment the line: extension=php_curl.dll
restart your apache server.
This is what caused it on my server (XAMPP installation)
Comment #2
gvc CreditAttribution: gvc commentedThank you, I made the below change to php.ini(in /etc/php5/apache2). Found that curl.so was available under conf.d directory.
Added the following under Dynamic Extensions section of php.ini.
; configuration for php CURL module
extension=/conf.d/curl.so
So the previous error has gone.
Now after adding the new fb module, I get this error.
Notice: Undefined property: stdClass::$canvas_name in fb_app_admin_form_submit() (line 254 of /var/www/sites/all/modules/fb/fb_app.admin.inc).
Notice: Undefined property: stdClass::$canvas_name in fb_admin_page() (line 48 of /var/www/sites/all/modules/fb/fb.admin.inc).
Comment #3
Dave Cohen CreditAttribution: Dave Cohen commentedThere's not much we can do about the CURL extension. It is a prerequisite.
The 7.x branch still has a bunch of PHP notices. Agreed that needs to be fixed, but that's for another thread.