[resolved] Plugin using a different PHP SDK? (3 posts)

  1. CPilko
    Posted 4 years ago #

    I'm using the PHP SDK to pull dynamic content via the Graph API into a widget on my site via a custom plugin.

    After installing the Facebook plugin, I get an error Cannot redeclare class Facebook... if I try to include a copy of the standard PHP SDK. I commented out my include and now rely on the Facebook class loaded by the plugin.

    Now, when I try to make an api call (fql), I get the error: Access to undeclared static property: BaseFacebook::$CURL_OPTS in my_server/wp-content/plugins/facebook/includes/facebook-php-sdk/base_facebook.php on line 880.


  2. Samuel Wood (Otto)
    WordPress.org Tech Dude
    Plugin Contributor

    Posted 4 years ago #

    Yes, the plugin has a modified version of this class.

    Try using the class Facebook_WP instead, which extends the Facebook class to use the WordPress WP_HTTP API.

  3. CPilko
    Posted 4 years ago #

    Thanks Otto. That works.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic