How to load third party php library in drupal 7 module? Suppose i want to load facebook-php-sdk for facebook connect in my drupal website, how can i load that class file in my module, i tried with libraries module, with different function provided with that api, but everytimes i fail.
You can do the same way in Drupal for Facebook module and put these code in your custom module:

 $fb_lib_path = function_exists('libraries_get_path') ? libraries_get_path('facebook-php-sdk') : 'sites/all/libraries/facebook-php-sdk';
 $fb_platform = $fb_lib_path . '/src/facebook.php';
 try {
     if (!class_exists('Facebook') &amp;&amp; !@include($fb_platform)) {
      //show error
      return NULL;
     }
     $fb = new Facebook(array(
       'appId' =&gt; $appId,
       'secret' =&gt; $secret,
       'cookie' =&gt; $cookie));
 }
 catch (Exception $e) {}


You can check the fb_api_init function of Drupal for Facebook module for more detail.