Hi all, I could solve the problem I had.
I added the condition if, in my files facebook.php and base_facebook.php
if ( ! class_exists( 'FacebookApiException' ) ): this condition i added into my file base_facebook.php
And this if ( ! class_exists( 'Facebook' ) ): into my file facebook.php
But when I tried to upload the image from my website to facebook, got an error which was not declaring the function $CURL_OPTS in class BaseFacebook in the file base_facebook.php of the plugin facebook.
So I had to add the default option for curl, in the base_facebook.php of the plugin facebook.
`public static $CURL_OPTS = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => ‘facebook-php-3.1’,
);`
Now my app worked well.
Sorry for my english my native language is spanish.
Regards.
What line? Can you paste the full error?
We don’t use the class Facebook. We use WP_Facebook, so this should be a non-issue.
Hi @matt Kelly I’ve solved the problem. Adding conditions to my files. But there was a function not declared in the file base_facebook.php of the plugin facebook. The function $CURL_OPTS I had to add it to the file. For my application worked
@quimbox, awesome glad you got it fixed. Is the code available anywhere?
@matt Kelly I guess that refers to the plugin file base_facebook.php
The recent php facebook sdk is available on github . But the archive base_facebook.php in the folder facebook-php-sdk of the plugin not contain the default options for curl, maybe you want to update it.
Regards