简体   繁体   中英

How get last 10 tweets of certain user using php?

I need to receive just few my last tweets for short timeline on my homepage. Tell me the easiest way to do this.
PS I use Codeigniter and it would be nice to get a solution for it ^_^

Thank you so much for the earlier

Zend_Service_Twitter example from the manual:

$twitter = new Zend_Service_Twitter(array(
    'username' => 'johndoe',
    'accessToken' => $token,
    'count' => 10,
));
$response   = $twitter->status->userTimeline();

You can use it just fine with codeignitor.

I was just looking into this same thing this morning. Found this helpful tidbit from Greg Aker http://www.gregaker.net/2011/feb/12/codeigniter_reactors_caching_drivers/ It loads in the latest X number of tweets as well as uses caching. There is a bunch more query params that can be sent t the Twitter API. You can see them all at http://apiwiki.twitter.com/w/page/22554679/Twitter-API-Documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM