Support » Plugin: WPBook » [Plugin: WPBook] Fatal error: Access to undeclared static property: Facebook::$CURL_OPTS

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author John Eckman


    @frankog can you try commenting out lines 30/31 of publish_to_facebook.php?

    I had to add those to support users whose ssl certificates were self-signed – but maybe that’s conflicting with some other plugin you have also using the Facebook api?

    Do you have the plugin enabled now? Looking at the app canvas page:

    This seems off – it should be showing in the WPBook theme.

    Loading either or

    should try to invoke WPBook but isn’t.

    Plugin Author John Eckman


    I also wonder if the error doesn’t suggest some kind of problem with the install, since it should be finding the Facebook client in the right place – maybe try uninstalling and reinstalling?

    Hi John.
    I get the same error. It came after the last wordpress update.
    Also deinstall/install did not fix this.
    What can I in addition try ?
    thanks in advance

    Plugin Author John Eckman


    @analogixx are you running other Facebook related plugins?

    You can try the same fix I suggested above which is to comment out (or delete) lines 30 and 31 in:


    But that potentially only shifts the problem, as the real issue is why your copy of the Facebook api doesn’t allow this – suggests you have an older FB SDK hanging around somewhere.

    One other thing to check is at line 9 of that same file, does it say:
    if(!class_exists('Facebook')) {

    or does it say:
    if(!class_exists('FacebookRestClient')) {

    You WANT it to be checking for Facebook class, not FacebookRestClient class.

    i have same problem using andy peatlings facebook connect plugin maybe that is why?

    i commented out those 2 lines you mentioned which got rid of the error when publishing a post ..but no post made it the facebook wall or that page

    anything else i can try? really would love to use this to import my facebook comments into wordpress!

    Plugin Author John Eckman


    @ds123 The issue of no post making it to the wall is likely completely unrelated to this error.

    What does your check permissions page say? (WordPress->Settings->WPBook, stream/wall options, click on “check permissions” link)

    @johneckman thanks for the reply … when i click on check permissions it brings up facebook and a totally blank page (other than facebook stuff on the right side)

    i recreated the app following your instructions to make sure i didn’t miss anything

    on another note i’ve had all sorts of issues with iframe and facebook lately ..even using their like box generator the iframe didn’t work but the xbml did …. another weird thing yesterday i created some simple apps for wordpress to connect to other than yours and if i used one of my old apps meaning an app on facebook i created long time ago and modified it it worked…creating new app then plugin didn’t work

    IFrame tab issues

    Mar 24, 2011 2:16pm
    Most iframe tab issues have been resolved since Thursday afternoon, including on app profile pages.

    IFrame tab issues

    Mar 22, 2011 5:21pm
    We’re seeing issues with some iFrame tabs failing to load. We’re investigating and will follow up further in bug 16102.

    Missing bookmarks for some users

    Mar 18, 2011 2:19pm
    We are seeing reports of missing bookmarks and users having to reauthorize apps. This appears to be happening only for a subset of users. We are currently investigating.

    Hey *,
    I think I’ve got the same error, but I am not a hundred percent sure.
    I have new most recent WP-Version and WPBook 2.1.4.
    1. After updating WP I de- and reinstalled WPBook.
    2. Checked the Facebook-App-Settings as described somewhere in the docu for updating from 2.0.x to 2.1
    3. got the from the first post here
    4. commented line 30 & 31 out in wp-content/plugins/wpbook/includes/publish_to_facebook.php
    5. change Facebook class from ‘FacebookRestClient’ to ‘Facebook’ in line 9 – same file.

    now I get the following error when I publish I post and nothing appears on my wall:

    Fatal error: Call to undefined method Facebook::api() in /var/www/web1077/html/blog/wp-content/plugins/wpbook/includes/publish_to_facebook.php on line 208

    I have also another Facebook plugIn which enables single-login named “Facebook Connect”

    kind regards and thx in advanced

    I just had I look on the other plugin. The Facebook client is completely different. I am wondering if it is possible to just name the Facebook classed used for WPBook different, so that two different can exists next to each other.

    Plugin Contributor Brooke


    @marste I think the problem is that FB Connect using an older version of the Facebook Class. I also don’t think renaming the class will work because then you’ll get a cannot redefine function error.

    Hopefully when FB Connect upgrades to the new API the problem will go away. For now your SOL on using both at the same time.

    After the last posts I checked my environment. I also have FB connect running. But when I deactivate i get the “invalid oAuth .. access error” when I post something only with WPbook activated.
    I tried to grant permission again over the WPbook function but get the message in Facebook “error..please try again later”

    Plugin Author John Eckman



    The invalid oAuth error you refer to is because WP does not have the correct access token stored. In general this is due to a misconfiguration of WPBook.

    The error you are getting when you try to grant permissions is the problem – is there a corresponding error in your PHP logs when that happens?

    What version of WordPress are you running? Have you updated to WPBook 2.2?

    What’s the URL of your blog outside Facebook, and what is the url of your Facebook application?

    I found now why I can’t grant authority again. Between the message there’s another on, which disappears in half a second:

    Your Facebook Profile ID must match the ID which you are logged in…

    But it is exactly the ID I’m logged in.

    But this text is interesting:
    “The Facebook profile ID you are currently logged in to Facebook as is . You have defined xxx as your Facebook user id in WPBook Settings.”

    … to Facebook as is .
    looks like WPBook does not know what I’m logged in

    Plugin Author John Eckman


    Hmm. WPBook should know that you are logged in.

    Have you visited your canvas page? (

    Are you logged in to Facebook in some unusual way, as other than a regular user?

    Farther down the page, does it say:

    FB Profile XXX has granted the following permissions:

    WPBook is getting that value directly from the OAuth payload from Facebook. No idea why that would be blank, but it certainly will cause trouble if it is.

    Have you set your Facebook application to use OAuth 2.0 based authentication?
    (“OAuth 2.0 for Canvas” in Advanced, Migrations)

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Plugin: WPBook] Fatal error: Access to undeclared static property: Facebook::$CURL_OPTS’ is closed to new replies.