twitter - How to retrieve tweets using codebird.php -


i'm trying use codebird show latest tweet on simple website. unfortunately, can't manage make work. here's did now. created app on twitter developer page. obtained key/secret , token/secret. wrote small php script , tried show timeline see if works. here encountered problems. code goes this:

<?php require_once ('codebird.php'); \codebird\codebird::setconsumerkey(my_key, my_secret);   $cb = \codebird\codebird::getinstance(); $cb->settoken(my_token, my_token_secret); $reply = (array) $cb->statuses_hometimeline(); print_r($reply); ?> 

(and put various key strings in correct arguments).

this code gives array ( [httpstatus] => 0 ). tried

print_r($reply[0]); 

but nothing printed out in page.

where wrong? how should modify code last tweet? i'm bit new new twitter api, , lot of stuff confuses me.

thank help!

i copied , pasted code , it's not working. error regarding codebird class

try:

require_once ('codebird.php'); codebird::setconsumerkey('key', 'secret key');  $cb = codebird::getinstance(); $cb->settoken('token', 'secret token'); $reply = (array) $cb->statuses_hometimeline(); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -