Skip to content

Instantly share code, notes, and snippets.

@pvalencia
Created August 17, 2009 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvalencia/169204 to your computer and use it in GitHub Desktop.
Save pvalencia/169204 to your computer and use it in GitHub Desktop.
example for twitter-cakephp-component
<?php
class FooController extends AppController {
var $components = array('Twitter');
function bar() {
/* authentication */
$this->Twitter->username = 'foo';
$this->Twitter->password = 'bar';
$this->set('statuses',
$this->Twitter->statusesFriendsTimeline() /* <- Camelized method name */
);
}
function rab() {
/* Without authentication */
$this->set('statuses',
$this->Twitter->statusesPublicTimeline()
);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment