05-15-2008, 06:07 PM
[eluser]damon311[/eluser]
All,
I am new to CodeIgniter (I'm making the switch from Rails and Java) so this may be user error. I'm getting a "api key is invalid" error when running the code below. I've copied the Bebo PHP library (http://developer.bebo.com/downloads/exam...bs-php.php [renamed to Bebo.php]) to $home/system/application/libraries/Bebo.php. The library is being loaded properly but it complains about the API key (I copied and pasted both the api and secret key from Bebo). Any ideas? Thanks
All,
I am new to CodeIgniter (I'm making the switch from Rails and Java) so this may be user error. I'm getting a "api key is invalid" error when running the code below. I've copied the Bebo PHP library (http://developer.bebo.com/downloads/exam...bs-php.php [renamed to Bebo.php]) to $home/system/application/libraries/Bebo.php. The library is being loaded properly but it complains about the API key (I copied and pasted both the api and secret key from Bebo). Any ideas? Thanks
Code:
class Test extends Controller {
function Test() {
parent::Controller();
require_once APPPATH . 'libraries/Bebo.php';
#load config
$this->my_config = $this->config->item('bebo');
#initialise bebo
$apikey = $this->my_config['api_key'];
$apisecret = $this->my_config['api_secret'];
$this->bebo = new Bebo($apikey,$apisecret,true);
}
function index() {
$friends = $this->bebo->friends_get();
foreach($friends as $item):
echo $item;
echo '<hr/>';
endforeach;
}
}