You are here

function _fbconnect_facebook_client_load_include in Facebook Connect 6.2

@todo.

2 calls to _fbconnect_facebook_client_load_include()
fbconnect_facebook_client in ./fbconnect.module
Get the facebook client object for easy access.
fbconnect_requirements in ./fbconnect.install
Implements hook_requirements().

File

./fbconnect.module, line 282
Integration with Facebook Connect API.

Code

function _fbconnect_facebook_client_load_include() {
  if (!class_exists('Facebook')) {
    $lib_paths = _fbconnect_facebook_client_search_paths();
    foreach ($lib_paths as $dir) {
      $lib_paths[] = $dir . '/php';
      $lib_paths[] = $dir . '/src';
    }
    foreach ($lib_paths as $path) {
      $client_include = $path . '/facebook.php';
      if (file_exists($client_include)) {
        include_once $client_include;
        break;
      }
    }
  }
  return class_exists('Facebook') && defined('Facebook::VERSION');
}