facebook - How do you load third party package in Codeigniter? -


this elementary question.

i downloaded facebook php sdk , stored in "third_party" folder within codeigniter. hoping should go. how load such php sdk?

thanks

i ended sticking in in ci's libraries directory , adding libraries autoload in config/autoload.php

autoload.php:

$autoload['libraries'] = array('facebook'); 

then, made small change facebook implementation (constructor of facebook class) , added keys app's config file:

public function __construct() {     $ci =& get_instance();      $this->setappid($ci->config->item('fb_appid'));     $this->setapisecret($ci->config->item('fb_secret'));     $this->setcookiesupport($ci->config->item('fb_cookie'));     $this->setbasedomain($ci->config->item('fb_domain'));     $this->setfileuploadsupport($ci->config->item('fb_upload')); } 

...and presto - have access facebook's api in models , controllers via $this->facebook


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

java - where to store the user credentials in an enterprise application(EAI)? -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -