Skip to content

Instantly share code, notes, and snippets.

@donaldallen
Created January 24, 2013 20:42
Show Gist options
  • Save donaldallen/4627509 to your computer and use it in GitHub Desktop.
Save donaldallen/4627509 to your computer and use it in GitHub Desktop.
Route::get('/', function()
{
$tweets = Cache::remember('tweets', 5, function() {
$client = new Client('http://api.twitter.com/1.1');
$oauth = new OauthPlugin([
'consumer_key' => '*',
'consumer_secret' => '*',
'token' => '*',
'token_secret' => '*'
]);
$client->addSubscriber($oauth);
return $client->get('lists/statuses.json?list_id=84188434')->send()->json();
});
return View::make('tweets')->with('tweets', $tweets);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment